Skip to content

Commit

Permalink
Fix datagrid not fitting into containers (#3894)
Browse files Browse the repository at this point in the history
* Fix datagrid not fitting into containers

* cl
  • Loading branch information
snide authored Aug 12, 2020
1 parent 7572226 commit 5ebf353
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- Fixed `EuiFacetGroup` container expansion due to negative margin value ([#3871](https://github.com/elastic/eui/pull/3871))
- Fixed `EuiComboBox` delimeter-separated option creation and empty state prompt text ([#3841](https://github.com/elastic/eui/pull/3841))
- Fixed `EuiDataGrid` not properly resizing within a fixed height container ([#3894](https://github.com/elastic/eui/pull/3894))

**Breaking changes**

Expand Down
4 changes: 4 additions & 0 deletions src/components/datagrid/__snapshots__/data_grid.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Array [
tabindex="-1"
/>,
<div
class="euiDataGrid__focusWrap"
data-focus-lock-disabled="disabled"
>
<div
Expand Down Expand Up @@ -714,6 +715,7 @@ Array [
tabindex="-1"
/>,
<div
class="euiDataGrid__focusWrap"
data-focus-lock-disabled="disabled"
>
<div
Expand Down Expand Up @@ -1575,6 +1577,7 @@ Array [
tabindex="-1"
/>,
<div
class="euiDataGrid__focusWrap"
data-focus-lock-disabled="disabled"
>
<div
Expand Down Expand Up @@ -2111,6 +2114,7 @@ Array [
tabindex="-1"
/>,
<div
class="euiDataGrid__focusWrap"
data-focus-lock-disabled="disabled"
>
<div
Expand Down
4 changes: 4 additions & 0 deletions src/components/datagrid/_data_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,7 @@
padding: $euiSizeS;
margin: -$euiSizeS; // Offset against the panel to make the scrollbar flush scrollbars
}

.euiDataGrid__focusWrap {
height: 100%;
}
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ export const EuiDataGrid: FunctionComponent<EuiDataGridProps> = props => {
<DataGridContext.Provider value={datagridContext}>
<EuiFocusTrap
disabled={!isFullScreen}
style={{ height: '100%' }}>
className="euiDataGrid__focusWrap">
<div
className={classes}
onKeyDown={handleGridKeyDown}
Expand Down

0 comments on commit 5ebf353

Please sign in to comment.