Skip to content

dynamic editSelectOptions list #833

Answered by KevinVandy
tttp asked this question in Q&A
Nov 23, 2023 · 2 comments · 8 replies
Discussion options

You must be logged in to vote

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

  editSelectOptions?:
    | ((props: {
        cell: MRT_Cell<TData, TValue>;
        column: MRT_Column<TData>;
        row: MRT_Row<TData>;
        table: MRT_TableInstance<TData>;
      }) => DropdownOption[])
    | DropdownOption[];

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
6 replies
@tttp
Comment options

@loughlinclaus3
Comment options

@KevinVandy
Comment options

Answer selected by tttp
@loughlinclaus3
Comment options

@KevinVandy
Comment options

@loughlinclaus3
Comment options

Comment options

You must be logged in to vote
2 replies
@KevinVandy
Comment options

@tmax22
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants