diff --git a/CHANGELOG.md b/CHANGELOG.md
index de7850acab1..e7d43e967fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,8 @@
- Fixed bug in `EuiDataGrid` where a custom `className` was also being passed to the full screen button ([#5050](https://github.com/elastic/eui/pull/5050))
- Fixed rerender state issues in `PaginationButton` inside `EuiPagination` ([#5048](https://github.com/elastic/eui/pull/5048))
+- Fixed bug in `euiHeaderAffordForFixed` mixin that was not accounting for situations where `EuiDataGrid` was in full screen mode ([#5054](https://github.com/elastic/eui/pull/5054))
+- Fixed `z-index` styles that were causing `EuiModal` and `EuiFlyout` components to appear behind `EuiDataGrid` when in full screen mode ([#5054](https://github.com/elastic/eui/pull/5054))
**Theme: Amsterdam**
diff --git a/src-docs/src/views/datagrid/datagrid.js b/src-docs/src/views/datagrid/datagrid.js
index 3ee80026103..57155e3abf8 100644
--- a/src-docs/src/views/datagrid/datagrid.js
+++ b/src-docs/src/views/datagrid/datagrid.js
@@ -8,17 +8,30 @@ import React, {
useContext,
useRef,
} from 'react';
+import { Link } from 'react-router-dom';
import { fake } from 'faker';
import {
+ EuiButton,
+ EuiButtonEmpty,
+ EuiButtonIcon,
+ EuiCode,
+ EuiContextMenuItem,
+ EuiContextMenuPanel,
EuiDataGrid,
+ EuiFlyout,
+ EuiFlyoutBody,
+ EuiFlyoutFooter,
+ EuiFlyoutHeader,
EuiLink,
- EuiFlexGroup,
- EuiFlexItem,
+ EuiModal,
+ EuiModalBody,
+ EuiModalFooter,
+ EuiModalHeader,
+ EuiModalHeaderTitle,
EuiPopover,
- EuiPopoverTitle,
- EuiButtonIcon,
- EuiSpacer,
+ EuiText,
+ EuiTitle,
} from '../../../../src/components/';
const DataContext = createContext();
@@ -173,58 +186,140 @@ const trailingControlColumns = [
width: 40,
headerCellRender: () => null,
rowCellRender: function RowCellRender() {
- const [isPopoverOpen, setIsPopoverOpen] = useState(false);
+ const [isPopoverVisible, setIsPopoverVisible] = useState(false);
+ const closePopover = () => setIsPopoverVisible(false);
+
+ const [isModalVisible, setIsModalVisible] = useState(false);
+ const closeModal = () => setIsModalVisible(false);
+ const showModal = () => {
+ closePopover();
+ setIsModalVisible(true);
+ };
+
+ let modal;
+
+ if (isModalVisible) {
+ modal = (
+
+
+ EuiModal
+ {' '}
+ components have a higher
+
+ EuiFlyout
+ {' '}
+ components have a higher
+ Flyouts are also styled with a vertical offset that accounts
+ for the presence of fixed headers. However, when the data grid
+ is in full screen mode, these offset styles are ignored to
+ allow the flyout to correctly appear at the top of the
+ viewport.
+ A typical modal
+ A typical flyout
+