Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `31.6.0`.

- Added a light background to `EuiDataGrid` and removed unnecessary height on its container ([#4509](https://github.com/elastic/eui/pull/4509))

## [`31.6.0`](https://github.com/elastic/eui/tree/v31.6.0)

Expand Down
3 changes: 2 additions & 1 deletion src/components/datagrid/_data_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
max-width: 100%;
width: 100%;
z-index: 2; // Sits above the pagination below it, but below the controls above it
background: $euiColorLightestShade;
}

.euiDataGrid__controls {
Expand Down Expand Up @@ -115,6 +116,6 @@
}

.euiDataGrid__virtualized {
@include euiScrollBar;
@include euiScrollBar($euiColorDarkShade, $euiColorEmptyShade);
scroll-padding: 0;
}
6 changes: 1 addition & 5 deletions src/components/datagrid/data_grid_body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ const InnerElement: VariableSizeGridProps['innerElementType'] = forwardRef<
InnerElement.displayName = 'EuiDataGridInnerElement';

const INITIAL_ROW_HEIGHT = 34;
const SCROLLBAR_HEIGHT = 16;
const IS_JEST_ENVIRONMENT = global.hasOwnProperty('_isJest');

export const EuiDataGridBody: FunctionComponent<EuiDataGridBodyProps> = (
Expand Down Expand Up @@ -515,10 +514,7 @@ export const EuiDataGridBody: FunctionComponent<EuiDataGridBodyProps> = (
}, [getRowHeight]);

const unconstrainedHeight =
rowHeight * visibleRowIndices.length +
SCROLLBAR_HEIGHT +
headerRowHeight +
footerRowHeight;
rowHeight * visibleRowIndices.length + headerRowHeight + footerRowHeight;

// unable to determine this until the container's size is known anyway
const unconstrainedWidth = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/global_styling/mixins/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

// Set scroll bar appearance on Chrome (and firefox).
@mixin euiScrollBar {
@mixin euiScrollBar($thumbColor: $euiColorDarkShade, $trackBackgroundColor: transparent) {
// Firefox's scrollbar coloring cascades, but the sizing does not,
// so it's being added to this mixin for allowing support wherever custom scrollbars are
// sass-lint:disable-block no-misspelled-properties
Expand All @@ -37,14 +37,14 @@
}

&::-webkit-scrollbar-thumb {
background-color: transparentize($euiColorDarkShade, .5);
border: $euiScrollBarCorner solid transparent;
background-color: transparentize($thumbColor, .5);
border: $euiScrollBarCorner solid $trackBackgroundColor;
background-clip: content-box;
}

&::-webkit-scrollbar-corner,
&::-webkit-scrollbar-track {
background-color: transparent;
background-color: $trackBackgroundColor;
}
}

Expand Down