You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the selection is in no order (the order is dependent on browsers, polyfills etc.). I see how this could be useful but I'm not really in favor of keeping the selection sorted. There are quite a few situations where there is no intuitive correct order or the correct order depends on specific use case; for example multiple nodes and/or edges can be selected at the same time (What order should it be then?), unselected and reselected (This is ignored now, should it change the order?) etc. It wouldn't really work well for anything other than these very simple cases.
However, for your specific and very simple usecase, it should be quite easy to just listen to the events and react only when there is one node already selected and one new node added to the selection.
Alternatively, and I consider this much better option, we could keep selection timestamp for each item or maybe keep incrementing sequential number for every selection and add it to each newly selected item. The big advantage here would be that it would be obvious what was selected together in one go and what was selected sequentially, providing better support for more advanced usecases.
Hello folks,
At the moment if multiselect option is active, e.g.:
then the selection order is not preserved. Selected nodes (ids) are always sorted. It would be nice to have possibility disabling sorting.
Example how it is now:
Use Case 1: Click nodes 1,2,3 -> selection: 1,2,3
Use Case 2: Click nodes 3,1,2 -> selection: 1,2,3
Nice to have:
Use Case 1: Click nodes 1,2,3 -> selection: 1,2,3
Use Case 2: Click nodes 3,1,2 -> selection: 3,2,1
The text was updated successfully, but these errors were encountered: