Right folks, I cannot exclude that the systematic problem is between the chair and the keyboard so please bear with me.
I can't figure out how to deselect rows in the table (new one, not legacy). This table is set in the Single row selection mode, so there isn't these cute little selection boxes at the start of the row, which simply highlights when you click on the row.
And I don't know how to deselect a row previously selected. I don't mean programmatically, I mean through user clicks. I can select a row by clicking on it, it highlights and reacts correctly with the event handlers, but for the life of me I cannot figure out how it is meant to be de-selected.
I have tried another left click on said row, as well as ctrl-click, capital-click, right-click... I'm running out of ideas.
You're right there's no way to unclick but you can script it.
It's a clunky workaround though, adding an event handler on the table row click event and storing the selectedRow in a temp variable. Compare the row click event with the last clicked one and if it's the same clear selection and if it's different set the variable.
Alternatively have a custom button on the table footer that's called "clear selection"
Hey all! There is the clearSelection method available on the table. So you could handle this with an external button, toolbar custom button, or table event handler depending on the desired outcome.
Happy to also file the Feature Request. For clarity on the expected behavior, are you looking for the row to be de-selected when it is clicked again?
I know you said 'not programmatically' but I don't think there is any other way, other than waiting for a Feature Update i guess. since you are using single row selection the event handler is actually very simple to get this working.
Yes, a click again would be a very good way of deselecting a row. And the event handler associated would also be welcome, for example in order to clear any form fields related to the entry that is no longer selected
I had a similar need and was able to resolve it by adding a custom button to the table's toolbar.
For anyone not sure how to do that: I selected the table, under Addons, there "Toolbar" I clicked that. In the toolbar dialog I hit "+" and selected to add a custom button. I gave it an icon and set "hidden" to {{ !tblMyTable.selectedRow }} so it only shows up when there is a selection on the table. Then for interactions I clicked "+" and added a "Clear selection" for the table (for "Action" select "Control Component", then selected the target table as the "Component" and "Clear selection" as the method).
This worked out well for me because I actually had a few other things I wanted to do when the selection was cleared (cleared filters on a few of the other components, etc). It's not quite what I think you are asking for (some like clicking the row a second time will clear it) but the user sees the "Clear" icon/button show up on the toolbar whenever they select a row, so the UX isn't too bad either.