-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Datagrid): add opt out ability for editable cells #5425
feat(Datagrid): add opt out ability for editable cells #5425
Conversation
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I checked out the changes on my local env and this works, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
…thewgallo/ibm-products into 5379-datagrid-opt-out-of-inline-edit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
648571e
Closes #5379
Currently there is no way to opt out of inline editing at the cell level. You can disable editing for an entire column in the table but it isn't possible to have one or more non editable cells in a column with other editable cells. This PR adds that behavior, I added a note in the
EditableCell
story about which cell is non editable for demonstration purposes.Example story can be viewed here.
I also found a bug within editable cell Datagrids where if you attempt to go into edit mode (Enter key) from a non-editable cell, the inline edit context's reducer updates the state to be in edit mode. This prevents you from actually going into edit mode within an editable cell because the context thinks we're already in edit mode. I've included this fix here as well since it was a very small change.
What did you change?
How did you test and verify your work?
Storybook