Perspective Table Cell Edits

I’m using a table where I have one column’s editable property is set to true, the cells I want to edit are boolean values so the cell has a check mark. However, when I go into preview mode to test the behavior it will toggle from true to false but revert back to false when I click on another cell or exit preview mode. I have tried to change the allowEditOn property from single and double click to long press but still get the same behavior.

You will likely have more to do than just check a box. Assuming you are using a database to populate data, you will need to write code to update the database using onEditCellCommit. This may be helpful.

1 Like

I should have mentioned that I’m populating the data property as an array of objects that I entered, no database data. I want to be able to bind the cells in the Enabled column to properties of other components that will make them visible or enabled, for example. In this scenario do I still need to use onEditCellCommit?

Props config
props settings

Yes, something has to write back to the source.
Did you read the linked doc, it has an example:

# This example will set the value of a cell, based on what the user typed into it.
# Get the value that was typed into the cell
valueToSet = event.value
# We need to set a value in a particular cell. The event object contains row and column properties
#  that report the position of the cell that was edited.[event.row][event.column] = valueToSet
1 Like

I did, thank you!