let’s assume I have 3 options (A, B, C). If I select C in one cell dropdown I should only see options that I have not selected in any cell(A, B).
is there any direct configuration option to perform this process ?
How to hide a option once it is selected in a cell
Thank you for contacting us. Regarding your question. There is not such an option available through our API. What you would need to do to achieve that functionality is to build a Custom Editor that would check which options are already chosen in other cells, and basing on that information it would display only other available options.
We have a tutorial about how to build your own Custom Editor here:
Sorry, but that is not helpful
I have a list of users(names can be same) that I’m showing in the cell dropdown.
how can I track them if the source only takes an array of strings
The other option that you might consider is to store the list of the names for the dropdown in a variable and then use afterChange hook to modify it (by using splice, for example).
instead of sending an array of strings in the source why don’t we have the option to send array of objects, where we can keep other keys like (id,…). we can track duplicate values with ease.
the dropdown
cell type accepts only primitives as values. If you’d like to keep objects in the mentioned variable array - sure, you can. You’d just need to map them to meet dropdown
value standard.
why only primitives? why dont we have it like, it is react-select. in react-select we provide array of objects as options. where user see labels but we get value. is there any complications in implementing this in handsontable?
Well, you can also use a key-value dropdown. I have a demo here https://jsfiddle.net/handsoncode/f0b41jug/ but it is not an official cell type in Handsontable so please treat that more as a prototype.