Set column type Dropdown to Object

Tags: #<Tag:0x00007efc650c2778> #<Tag:0x00007efc650c2570>

I would like to be able to set source to an object with a value and a label like such in the dropdown source type:

source: [
{ value: “1”, label: “I” },
{ value: “2”, label: “II” },
{ value: “3”, label: “III” },
],

Hi @sp1

I have an example that may help. It wasn’t tested with most of the features, but it uses a standard configuration of a cell renderer, validator, and editor.

If you would have any questions please let me know. Demo https://jsfiddle.net/handsoncode/z861xeuy

It’s not quite intuitive to implement this, do you have an example in react with HotTable? Maybe that would be easier.

@sp1 do you use modularization in your project? Depending if you do or don’t it changes a bit the code example. I will do my best to prepare one for you after confirming the modularization.

Yes i try to use modularized code as much as possible and I use this package: https://www.npmjs.com/package/@handsontable/react

Thank you. I will update you with a dem tomorrow.

Hi @sp1

I’ve created a local project using React and modularization. Please find it attached at (the forum does not accept .zip files attached) https://we.tl/t-ylNVC64amW

I’ve removed node_modules to make the .zip lighter. Please run npm i before running the example.