dynamic editSelectOptions list #833
-
Hi, I'd like to be able to have a different list of options available on an editVariant: select, is this an option I'm missing? example: on an editable (per cell or row), I have two columns, country and state if country = US, the list of options for state should be alaska, alabama... any other suggestion to achieve that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
This is supposed to already be supported. Check the dependency arrar of your column definitions if using useMemo |
Beta Was this translation helpful? Give feedback.
-
heres in example for custom autocomplete edit:
note for the usage of the undocumented @KevinVandy please consider documenting this propery ( |
Beta Was this translation helpful? Give feedback.
I have had this example showing that dynamically loaded edit select options is already possible if you get your column definition's memoization correct: https://www.material-react-table.dev/?path=/story/fixed-bugs-useeffects--edit-options-async
But I like the idea of making
editSelectOptions
a callback for a row by row / cell by cell basis.Changing the type to this in the next version, probably releasing in a few hours @loughlinclaus3