-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Describe the bug
The column-level readOnly property specified in column definitions is not being respected by cell variants. While grid-level readOnly works correctly, setting readOnly: true in meta.cell has no effect on preventing cell editing.
How to reproduce
- Create a data grid with a column that has
readOnly: truein its meta:
sconst columns = [
{
id: "trickName",
accessorKey: "trickName",
header: "Trick name",
meta: {
cell: {
variant: "short-text",
readOnly: true,
},
// or
// readOnly: true,
},
minSize: 180,
},
];
const { table, ...dataGridProps } = useDataGrid({
data,
columns
});
- Try to edit the "Trick name" column
- The cell becomes editable despite
readOnly: true
Link to reproduction
https://codesandbox.io/p/devbox/k8m4dp
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels