[EuiDataGrid] Row height switcher should override rowHeights + add reset button#5428
Conversation
fe81de3 to
37f3640
Compare
+ lineCount changes to also unset rowHeights overrides
+ improve snippet label
- to allow for testing - also since this is documented behavior, I don't know if need this in the actual example anymore - but if people prefer it, I can revert this commit
- to help focus more on rowHeightsOptions and more easily provide a bare minimum example
37f3640 to
9eca2e3
Compare
|
Sorry for force pushes (found a bug!), this is ready for review now with before/after screencaps! |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5428/ |
cchaos
left a comment
There was a problem hiding this comment.
💟 Before, I do a full review, is it possible to display the reset button only if the user has changed the configurations?
…to datagrid-rowheights-override
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5428/ |
|
Sure - 9b70058 |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5428/ |
cchaos
left a comment
There was a problem hiding this comment.
🙌 Works wonderfully. Just a visual suggestion.
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
|
Jenkins, test this |
|
Whoops, thanks for catching that! |
|
jenkins test this |
|
And those components need to be imported...lol |
|
🤦♀️ HAHA sorry I definitely should have opened this in VSCode instead of just committing the suggestion. Doing so now! |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5428/ |
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5428/ |
cchaos
left a comment
There was a problem hiding this comment.
I need to stop being lazy and just push you a commit 😆 . Pushing a fix to get it to align to the right instead of left. Other than that the rest of the design code LGTM!
|
🤦♀️ Haha sorry, i definitely should have done the same. Thanks Caroline! |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5428/ |
|
Preview looks good, merging |
cedee33
into
elastic:feat/datagrid/toolbar-reorg-and-row-height-switcher
…5415) * [EuiDataGrid] Toolbar UI layout reorganization (#5334) * [EuiDataGrid] Add extra left prepend position to the `additionalControls` API (#5394) * [EuiDataGrid] Add rowHeightSwitcher logic + API change (#5372) * [EuiDataGrid] Add `onChange` callbacks for display selector changes (#5424) * [EuiDataGrid] Row height switcher should override `rowHeights` + add reset button (#5428) * [EuiDataGrid] improve height calculation (#5447) Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Summary
closes #5411
Per the above discussion/design decisions, this PR now:
rowHeights(ee1469d)Before
before.mp4
After
after.mp4
Checklist
- [ ] Check against all themes for compatibility in both light and dark 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