Array inside data source object of dropwdown editor

Tags: #<Tag:0x00007fce69fa3e50> #<Tag:0x00007fce69fa3b30>

Hello ! , I’m using handston v12 in react project,

It would be very good that the drowdowns accept an array object as in the
source=[{value:1, label:‘label1’, …}, {value:2, label:‘label2’, …}]

options need to display each label then i choose any option need to save choosen option value

Pls help me

Hi @munkhtulgaworks

Thank you for contacting us. This feature isn’t yet implemented in Handsontable by our API. However, we have a workaround to achieve it. It requires to build a custom editor and validator to accept array of objects as a source:

Please keep in mind that it’s a workaround and may not be comaptible with some of our plugins.

Thanks for replay.

I saw this source before but i dont understand class based component. Can you help me for functional example pls.

Thank you

Hi @munkhtulgaworks

Custom editor needs to be built as an extension of original, base editor class, so it can’t be functional component.

1 Like

Okey thank you very much. I have 1 more question. Is it possible to add filter options when cell value change ? like autocomplete.

Hi @munkhtulgaworks

I answered your last question in this thread: Autocomplete table options

sry i found my solution. I just opened this not asking again.

Hi @munkhtulgaworks

Thank you for the update. I will close this topic.