I’m seeing something unusual which I think didn’t use to happen in previous version.
If you enable multi selection in the TableListBox, then select multiple items, clicking on an item of this selection won’t change the selection.
This is quite annoying especially if all items are selected and if you don’t have an empty space in the list to un select everything.
It seems this is broken again using command key to select multiple row
Both mouseDown and mouseUp call selectRowsBaseOnModifierKeys which call flipRowSelection,
so on mouse down it selects the row and on mouse up it deselect it.
I just wanna throw this out there now, but regarding the multi-select code for ListBox - while functional, does not efficiently support lists with hundreds of thousands or millions of rows.
There are methods of implementation, using a small amount of caller-provided storage for each row, that allow typical operations to execute in O(1) instead of O(n). For example, select all, deselect all, adding or removing a row from the selection, or determining if a row is selected, can all execute in O(1) if we allow for a bit of extra storage per row (two integers and a pointer).
Just checked the demo and indeed it works fine in the demo.
There is something I don’t get looking at the code though
DummyTableListBoxComponentWrapper::mouseDown
calls selectRowsBasedOnModifierKeys
when isCommandDown is true then it call flipRowSelection
the row is not yet selected so it calls selectRowInternal
the row is now selected
now on DummyTableListBoxComponentWrapper::mouseUp
it calls selectRowsBasedOnModifierKeys
when isCommandDown is true then it call flipRowSelection
and as the the row is selected it calls deselectRow
I’ve create a dummy wrapper around custom editor component in the tableList box so it selected when you click those editors as well.
look like my fowards to achieve this behaviour are wrong
What would be the best way to achieve this ?
For example you have a combobox in the TableListBox and you want that the selection in the combobox select the row where the combo box is.