[EuiDataGrid] Allow isExpandable to be set via setCellProps#5667
[EuiDataGrid] Allow isExpandable to be set via setCellProps#5667cee-chen merged 10 commits intoelastic:mainfrom
isExpandable to be set via setCellProps#5667Conversation
- 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/ |
chandlerprall
left a comment
There was a problem hiding this comment.
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 setCellPropsisExpandable to be set via setCellProps
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5667/ |
chandlerprall
left a comment
There was a problem hiding this comment.
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
isExpandableto be set at thecellPropslevel, 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