setCellMeta with AJAX call debounced

Tags: #<Tag:0x00007fce7002dcd0> #<Tag:0x00007fce7002d9b0>

Hi HoT Team,

Given this example,

is there a way to debounce the callback function for setCellMeta for setting the source of the autocomplete, so that it won’t send any server request on every keystroke?


Hi @r.evangelio

Do you have already any progress here? If you do, it would be easier to propose something. In general, you might use beforeChange hook to block the changes that shouldn’t be send to the server:


See this example:

hot?.setCellMeta(row, col, 'source', async (query: string, process: (items: string[]) => void) => {
  const res = await fetch('some/url').

When the user types, it invokes this callback function straightaway. I tried to use Handsontable debounce helper but it still process it due to the fact that the callback function was still invoked.

Hi @r.evangelio

I will close this topic now, as we moved the discussion here: