#Any way to run a side effect when clicked on an editable cell when row is not selected
1 messages · Page 1 of 1 (latest)
Hey There,
We've registered your query, and our team will get back to you soon.
Regards,
Pranav
Hello! To run a side effect when clicking on an editable cell in a table widget, you can use the onSubmit event for the column. This event is triggered when the user clicks away from the edited cell or presses the Enter key within it.
Let me know if this helps or if you face issues with it.
This page provides information related to all the editable column properties. You can enable the Editable property either by selecting the checkbox in the Table's column property settings or directly from the individual column settings. By enabling inline editing, users can update data directly from the UI by double-clicking on the desired cell
the editable cell in question is a select type column in a table.. when you click the edit icon then i want to run a side effect to fetch the options dynamically before submit.. so onSubmit or onOptionChange will not work for me.. is this possible???
{
async fetchOptions() {
// Your logic to fetch options
const response = await fetch('your-api-endpoint');
const data = await response.json();
return data.options; // Adjust according to your API response
}
}
- Bind the JSObject to the Table: Use the onEdit event of the table to trigger the fetching of options. You can do this by calling the JS function in the onEdit event:
{?{ JSObject1.fetchOptions() }?}
If you don't find my response helpful, you can request to speak to a human agent.
I would like to speak to a human please
Hello! You can add an action in the onOptionChange event of the Select column and use the triggeredRow object of the Table widget to get the selected option. Let me know if this helps.
i know optionchange but it runs after you select something.. not when you open dropdown to see options.. i want to compute something when you click on the edit icon of a cell in table for a select type column
Got it. This is not possible on Appsmith at this juncture. Could you please help us file a feature request using this link? - https://github.com/appsmithorg/appsmith/issues/new?assignees=Nikhil-Nandagopal&labels=Enhancement&projects=&template=--feature-request.yaml&title=[Feature]%3A+
Please add details about your use case, how this feature would help you, and give an example if possible. Once you file the GitHub issue, please share the link to it with us, so we can forward it to our development team.
https://github.com/appsmithorg/appsmith/issues/40875
thanks.. here is the link for the request