-
Notifications
You must be signed in to change notification settings - Fork 843
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
[EuiDataGrid] Allow isExpandable
to be set via setCellProps
#5667
Conversation
- as an override over props.isExpandable
…rors + refactor cell props destructuring slightly
@chandlerprall 👋 Opening this PR mostly to get your thoughts on this. This PR fully works and solves the use-case that users are requesting in #2793, I just had a few questions for you first:
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5667/ |
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.
One bit of logic was inverted, but the rest LGTM
Let's include it on the Data grid cell popovers page |
isExpandable
to be set at the via setCellProps
isExpandable
to be set via setCellProps
Preview documentation changes for this PR: https://eui.elastic.co/pr_5667/ |
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.
I pushed up a missing useEffect
import for the example, but everything else LGTM. I played with the datagrid focus example, verifying overriding from false
->true
also works and that the various focus states all respect overrides.
Preview documentation changes for this PR: https://eui.elastic.co/pr_5667/ |
Whoops, I totally forgot to stage that line 🤦♀️ (was working ahead to the cell actions branch and getting my staging all dirty). Thanks a million for the catch! Super fortuitously, the new cell actions logic for #5132 (the part where I need to check if |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5667/ |
Summary
closes #2793
This PR allows
isExpandable
to be set at thecellProps
level, which lets consumers override/more granularly setcolumn.isExpandable
. Consumers can key off of any of the props passed torenderCellValue
, such as rowIndex, colIndex, columnId, schema, etc.QA
https://eui.elastic.co/pr_5667/#/tabular-content/data-grid-cell-popovers#disabling-cell-expansion-popovers
Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] Checked in mobile- [ ] Checked in Chrome, Safari, Edge, and Firefox- [ ] Props have proper autodocs and playground toggles- [ ] Checked Code Sandbox works for any docs examples- [ ] Checked for breaking changes and labeled appropriately