Render Dropdown Array Object

Tags: #<Tag:0x00007f8b23fa3d08> #<Tag:0x00007f8b23fa3b28>

Is there a possibility to render an object array, [{label: "Red", key:12}, {label: "Black", key: 13}] in a dropdown type cell where the label value is displayed but internally has the value of key?

Hi @gvargash2

Yes, it is possible with custom implementation. Here you can find our example of how it can be implemented: https://jsfiddle.net/handsoncode/zsgm2hnc/

1 Like

@adrian.szymanski

In a non-custom dropdown cell, as you type, it autocompletes and selects the record.

How can I add this functionality in a custom cell?

  • Non-customized
    image

  • Customized dropdown - Not Filter
    image

Hi @gvargash2

I’m sorry for the late response. I didn’t get the notification that you answered. As key-value dropdown editor is a non-standard cell type in Handsontable it doesn’t utilize the same features as standard dropdown cell type. We don’t have an example with autocomplete and auto selection implemented, and it might be hard to implement, as this solution is based on a renderer that takes the ID number and swaps it with the assigned string value.