Deselect and Un-Highlight Table Row

Issue: Perspective table row remains highlighted after selectedRow property is set to None.
Goal: Using script, deselect and un-highlight the row of a table component.

More info: I am attempting to deselect the row of the table component. I have successfully deselected the row using ...props.selection.selectedRow = None. Yet the row remains highlighted. Any suggestions to un-highlight the row would be greatly appreciated.

Note: The table that I am working with has two columns, but only one is shown.

Images:
image

You have to set both selectedRow and selectedColumn to None.

Thank you for the response. Unfortunately I have already attempted setting both selectedRow and selectedColumn to None and it did not solve my issue.

I was able to find a work around. If the selectedRow and selectedColumn are set to -1, the row is unhighlighted. Then the selectedRow and selectedColumn can be set to None.

self.props.selection.selectedRow = -1
self.props.selection.selectedColumn = -1
self.props.selection.selectedRow = None
self.props.selection.selectedColumn = None
2 Likes