datatable dynamic load multiselect

Is it possible to handle multi-selection with dynamic data loading?
Currently if I select first row and ctrl+shift select last row, it fails with the following error:

webix_debug.js:19713 Uncaught TypeError: Cannot read property ‘id’ of undefined

Hello,

there is not possibility to use multiselect if data are loaded dynamically.

However, it is possible to select/unselect any item on its click. Please check the demo:

http://webix.com/snippet/72180b3f

or with Ctrl:

http://webix.com/snippet/7c56c156

Thank you for the ideas.

Can I catch and “friendly handle” multiselect error?

Is this possible in newer versions of Webix?

Hello, @dhersk

The error that was initially mentioned in this thread is fixed, and the current behavior corresponds to the possibilities of selection and dynamic loading.

Currently multiselect works with dynamic loading in the following manner:

  • if you select items one by one with Ctrl+Click, multiselect will handle them all, as you always click on an existing record,
  • if you use Shift+Click to select the range of rows/cells, the behavior will depend on the availability of data.

Selection is a client-side feature, i.e. it works only with the data that exists in the component.
Dynamic loading requests a batch of data when the user scrolls down to the rows that were not loaded yet. Until then, the datatable simply reserves the space and position for them, but they cannot be selected (as there’s no item ID to refer to).
With that said, with Shift+Click you can select only the range that is completely loaded.

If you select a top record, drag the scrollbar down to the last record (so that the rows in the middle wouldn’t be considered as required for loading) and select one of the last records with Shift+Click, there will be no valid range between 1st and the last records, and as a result, the selection will be reset to the last selected row.

https://snippet.webix.com/n7szfozn