Autocomplete editor with huge data

Tags: #<Tag:0x00007f0b03a09a50>

Hi,

I have autocomplete editor for a cell with more than 10K data.
Problem is, when autocomplete editor is closed and another cell is selected, it is rendering all the rows for the autocomplete editor in background. Which makes mouse selection slow/buggy. But this does not happen if selection is made with keyboard.

Is there any way to prevent this behavior?
I have created a fiddle for this issue -
steps -

  1. open autocomplete editor
  2. select option with mouse
    3.click on any other cell.

You will also see performace tip from handsontable in console.

https://jsfiddle.net/oceanwanderer/rj5qdbcf/1/

Thanks!

Hey @dev2

If you load a very long list of options that is a normal message to get.

The only way to get a shorter list of options is to serve a list of options in the beforeKeyDown event via updateSettings({ columns: [ { type: autocomplete, source: the_new_source } ] }). If you know they key a user types you can shorten the list to only the numbers that has the value typed. We do the same job for the autocomplete but it happens after the field gets the value. In your case it should work faster.

@aleksandra_budnik

Thanks for quick reply,
Yes I do filter the list. I have source as a function where query and callback is passed.

Full render of all available options (even filtered) doesn’t happen if I navigate using keyboard after selecting option.
But if using mouse, then table will render all the options as soon as other cell is selected.

Hey @dev2

I have asked my colleague to check if there’s something I’m missing, however, it looks like the is nothing we can do via official API to speed up the process of loading so many records in the list.