-
Notifications
You must be signed in to change notification settings - Fork 129
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 default expansion state to useNestedRows
#5261
feat(Datagrid): add default expansion state to useNestedRows
#5261
Conversation
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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!
Co-authored-by: andrew <emyarod@users.noreply.github.com>
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! reapproving after latest updates
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
aa4f2a1
Closes #5260
This PR provides a way to have rows expanded by default (when they're not included as part of
initialState.expandedRowIds
). By addingdefaultExpanded: true
to the row, theuseNestedRows
hook/plugin will toggle the expansion state so that if it is a new row and should be expanded by default, this is now possible.There is still an issue opened from @flannanl around expansion states being not kept after rerendering, but there is a separate issue open for this.
What did you change?
How did you test and verify your work?
Storybook