[BUG-5808]Perspective Table: Seeing an issue with boolean cell value edit

We are using Perspective Table to display some data.
Ignition version : 8.1.13 (b2021122109)

We are seeing an issue with edited cell value not being refreshed correctly after refreshBinding()

The Perspective table data is bound to a dataset called editedData.

We have an editCellCommit script which does below to reflect the boolean value correctly on the Table Cell.

valueToSet = event.value
self.custom.editedData = system.dataset.setValue(self.custom.editedData, event.row,event.column,valueToSet)

After editing boolean value in a particular row to select the row, we click on Delete icon above.
On delete icon click , the data is deleted from the database and we are refreshing a binding.

Please refer image “Before Delete.png”
Before Delete

I selected row with 20220324-00031
Clicked delete.

After delete icon click, row is removed from the table however table shows next row selected. (20220324-00030)
Please refer image “After Delete.png”
After Delete

Shouldnt the refresh binding show edited cell data correctly ?
Am I missing something here ?

Is this related to a post [Bug] Perspective Table Selection not Updating with Data Change.
Request to guide us regarding the same.

What is the script you have on the delete button to delete that row from the database? Could you share where you are calling refreshBinding as well? If possible, could you share the export of the view?

I think the problem is likely that your row selected property is independent of your data. It’s a property of the table, not the binding dataset / document.

Try setting each checkbox value to zero as you delete the rows.

Hi,
Yes, the script deletes a row from the database.
There are two custom properties on the table, one is sqlData which is bound to a query and other editedData.
Table’s data proerty is bound to editedData

On delete, row is deleted form table, we do a refreshBinding for sqlData . sqlData has ChangeScript which overwrites the editedData with selected = 0

The problem is the selected column where I had clicked to select is not updated until I navigate away from that column. Attached is view export.
Test_Table_Delete_2022-03-29_0328.zip (20.2 KB)

Thanks for the suggestion, however setting value to 0 also does not work. Unless I navigate away from the clicked table cell, the new value is not shown.

Your project download doesn’t work without the database so I can’t use it to find the problem.

Check the data properties in the designer to see what’s going on when you delete a row.

It looks like what you’re seeing here is a visual bug where that boolean selection value is still displayed after the Perspective Table’s data property is refreshed. I’ve created an internal ticket for this on our end for that to get worked on. For a seamless workaround, I suggest toggling the “editable” property of your respective boolean column, which will clear that selection.

You can do this in the onClick script that you trigger on the delete button, but you’ll need to provide a small amount of time for the value to update to False on the component before setting it back to True. I had success with your project by setting the editable property to False at the top of your onClick script and then back to True at the very bottom.

1 Like

Thank you so much ! We have added the workaround and it is working fine now !

Hello,
Any update on this ? I encountered the same issue and would like to avoid a "refresh lag".
Thanks