Comments (14)
@michelengelen could you assign me to this ticket? I can fix this
from mui-x.
@michelengelen Thanks for taking a look. I agree about the documentation, and the how the name should probably be isRowEditable
. Furthermore, there is no apparent way to pass in a field name to indicate which cell to disable.
Is there any kind of work-around to make an individual cell non-editable under certain conditions? In the column definition, there is an editable
property, but I do not see a way to set it programmatically.
from mui-x.
@Sebcio03 you're all set ... feel free to reach out if you need help.
from mui-x.
is this issue fixed @Sebcio03 @michelengelen ?
I'll do it utill monday.
from mui-x.
Hey @mdrake411 I can confirm this is a bug. Thanks for raising this!
@cherniavskii I'll add this to the board, so we can have a look.
As it seems the description in the docs is also a bit misleading.
It clearly states that isCellEditable
can be used to define which individual cells are editable,
You can use the isCellEditable callback prop to define which individual cells the user can edit in a given row.
but in the last section it says that the entire row will be disabled when the callback returns false
.
In the following demo, only the rows with an even Age value are editable. The editable cells have a green background for better visibility.
When this is intentional we should rename the prop to isRowEditable
and adjust the description as well.
WDYT?
from mui-x.
Additional thoughts... if one result of this bug will be to change the name from isCellEditable
to isRowEditable
, then there should be a corresponding way to disable the edit button in an action column with GridActionsCellItem
elements. Otherwise, It could be potentially confusing for a user to click an edit button, have the row turn into edit mode, and not be able to edit any columns.
from mui-x.
Just encountered this error in my code 😄 Can I fix this?
from mui-x.
@michelengelen , @cherniavskii , some of mdrake411's comments suggest that isCellEditable
should be replaced with controlling editable at the row level only.
However, I can see a lot of use cases when we might want to block just a single cell from being edited, in particular in cases like:
- the current user does not have permissions to edit this field
- the row represents a deleted/archived entity hence some of the properties should not be altered anymore
- some types of rows should allow editing only a subset of cells
from mui-x.
@czerwinskilukasz1 I did not mean to suggest that "isCellEditable should be replaced with controlling editable at the row level only". I was only making the observation that currently it appears that is what it does, despite its property name.
I agree with your use cases, and I have one similar use case. I need the a row to remain editable while a particular cell in that row is not editable depending on the value of another cell in that same row. I believe that would be more representative of the property name.
from mui-x.
is this issue fixed @Sebcio03 @michelengelen ?
from mui-x.
is this issue fixed @Sebcio03 @michelengelen ?
Not yet ... at least I haven't seen a PR opened for this.
from mui-x.
Hey is there any chat,irc where I can ask for help?
from mui-x.
Hey is there any chat,irc where I can ask for help?
Yes, we do have a discord community server: MUI on Discord
from mui-x.
Hi, is this issue already solved?
from mui-x.
Related Issues (20)
- [data grid] Issue with Korean Input in DataGrid Causing Duplicated Characters HOT 1
- [data grid] Using grid filter with `{ value: -1, label: 'All' }` pagesize option shows all rows minus 1 HOT 1
- [tree view] Add `getItemChildren` HOT 1
- [question][BarChart] How can I fix the BarChart tooltip on top of the bar? HOT 2
- Filtering and Sorting Not Working Correctly for Text Columns in DataGrid Using renderCell HOT 3
- [pickers] Handle `TextField` slots with `@mui/material@6`
- [data grid] Selection Column has no aria-label for screen reader a11y HOT 5
- [data grid] In column filter dropdowns HOT 2
- [data grid] Overlays aren't sticky in RTL mode HOT 1
- [x-license] MUI Missing license key HOT 1
- [charts] line charts not rendering on page load, only on mouse over HOT 3
- DatePicker format issue when format='DD/MMM/YYYY' UI shows "DD/MMMM/YYYY" HOT 2
- [tree view] Cursor navigation interferes with browser shortcut keys HOT 1
- [data grid] State change in component when `groupingColDef` and `pinnedColumns` leads to mis-render in Group column HOT 5
- [data grid] Warning: A props object containing a "key" prop is being spread into JSX HOT 2
- [data grid] Update `indeterminateCheckboxAction` default value
- [data grid] How to setup clickable value (like links) in input field HOT 1
- [charts] Generate chart images on the backend / from an HTTP API
- [charts] Missing `themeAugmentation` in pro plan HOT 1
- [charts-pro] Dependency local workspace reference causes runtime errors on ``createAxisFilterMapper`` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mui-x.