Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## [`main`](https://github.com/elastic/eui/tree/main)

No public interface changes since `41.2.1`.
**Bug fixes**

- Fixed an `EuiDataGrid` bug where paginated overflowing data grids could become unscrollable when `rowCount` changed ([#5400](https://github.com/elastic/eui/pull/5400))

## [`41.2.1`](https://github.com/elastic/eui/tree/v41.2.1)

Expand Down
7 changes: 1 addition & 6 deletions src/components/datagrid/body/data_grid_body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,6 @@ export const EuiDataGridBody: FunctionComponent<EuiDataGridBodyProps> = (
makeRowManager(innerGridRef)
);

// reset height constraint when rowCount changes
useEffect(() => {
setHeight(undefined);
}, [rowCount]);

useEffect(() => {
const boundingRect = wrapperRef.current!.getBoundingClientRect();

Expand All @@ -610,7 +605,7 @@ export const EuiDataGridBody: FunctionComponent<EuiDataGridBodyProps> = (
if (boundingRect.width !== unconstrainedWidth) {
setWidth(boundingRect.width);
}
}, [unconstrainedHeight, wrapperDimensions, isFullScreen]);
}, [rowCount, unconstrainedHeight, wrapperDimensions, isFullScreen]);

const preventTabbing = useCallback((records: MutationRecord[]) => {
// multiple mutation records can implicate the same cell
Expand Down