-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiDataGrid] Give rows actual positions/dimensions (#5555)
* Pass positioning and height/width to portalled rows + adjust scrolling workaround to obtain offsetTop from row parent instead of cell, now that individual cells have a top: 0 * Update snapshots * Fix scrolling workaround to use row offsetTop - now that cells are relative to the row parent, their offsetTop is 0 * Simplify row CSS - Remove `@include euiDataGridRowCell` mixin and target the row directly - Remove isStripableRow cell logic and instead use CSS nth-child for alternating stripes - Swap stripes and highlight CSS so that highlight takes precendence over stripes without an !important - Remove background color on individual cells to allow row colors to show through (NB: grid body is already set to the correct background color as well) * Add unit tests for row manager - skipping the mutation observer for now * Account for #5562 - cells no longer have a set background color (to allow row color to bleed through), and we were previously relying on the grid body's bg color to be white * Fix row widths bugging out due to stale containerRef reference - using CSS `left`/`right` and `relative` on the inner grid parent solves the issue instead, as the row is now always correct width * Add `data-gridrow-index` attr for users to more easily hook into rows * Fix rows to add `--striped` class instead of CSS :nth-child - which does not work well due to children changing on virtualization + set additional visible row index data attribute for extra detail + use dataset * Fix striped footer rows - was previously not working on prod, and now it does * [PR feedback] Convert getRow args to an object
- Loading branch information
Constance
authored
Feb 10, 2022
1 parent
7f59a7d
commit c1f5de4
Showing
15 changed files
with
229 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.