diff --git a/CHANGELOG.md b/CHANGELOG.md index bba2b257347..533660d52a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fixed default text alignment in `EuiTableRowCell` on Safari ([#5283](https://github.com/elastic/eui/pull/5283)) - Fixed `mobileOptions.truncateText` from getting overridden by `truncateText` in `EuiTableRowCell` ([#5283](https://github.com/elastic/eui/pull/5283)) +- Fixed issue with dynamic row counts in `EuiDataGrid` ([#5313](https://github.com/elastic/eui/pull/5313)) **Theme: Amsterdam** diff --git a/src/components/datagrid/body/data_grid_body.tsx b/src/components/datagrid/body/data_grid_body.tsx index 6627c842c5e..3c08e68eeb6 100644 --- a/src/components/datagrid/body/data_grid_body.tsx +++ b/src/components/datagrid/body/data_grid_body.tsx @@ -618,7 +618,7 @@ export const EuiDataGridBody: FunctionComponent = ( // reset height constraint when rowCount changes useEffect(() => { - setHeight(wrapperRef.current!.getBoundingClientRect().height); + setHeight(undefined); }, [rowCount]); useEffect(() => {