Conditionally enable cell editing #253
fracartdev
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
You can at least disable the edit textfield like this {
header: "name",
accessorKey: "name",
muiTableBodyCellEditTextFieldProps: ({ cell, row }) => ({
disabled: row.original.someCondition,
sx: {
//or add some other CSS here based on cell or row conditions
}
})
} Hope that helps |
Beta Was this translation helpful? Give feedback.
1 reply
-
@fracartdev MRT v1.8.0 now let's you enable editing per row conditionally enableEditing: (row) => row.original.someCondition |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice if there was a way to conditionally enable editing on cells. Maybe like adding the table values to the
enableEditing
prop:{ cell, column, row, table, }
Something along these lines..
Beta Was this translation helpful? Give feedback.
All reactions