rowSelectionChange adjustments
As a developer when I am using rowSelectionChange in tables such as a treetable, i would like to have a property that includes a boolean value that determines if the selection event was a select or an unselect.
The best way going about this is to store the selected index in an array and then removing them from the array if they exist to determine the select state, a similar property exists in selectionChange called 'selected' that indicates if the parameter is selected or unselected. Not sure why rowSelectionChange does not have this.
Hi @Todor-ads , We have created an internal incident to track this issue (2280161688) Thank you for query. Best regards, Jay
The reason why we don't have a "selected" parameter is explained here #2173.
What the sap.m.ListBase is doing with the selectionChange event is to provide the selected state of the first Item in the listItems array. It is pretty easy to get this information manually, if required. In the rowSelectionChange event, the first index in the parameter rowIndices can be used for that. If a more detailed view is required, one needs to iterate over all indices anyway, or use the getSelectedIndices API of the table to get the current selection state.