diff --git a/CHANGELOG.md b/CHANGELOG.md index c59462f7794..e0a7bd31f35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Bug fixes** +- Fixed `onClose` invoking with unexpected parameter in `EuiFlyout` ([#4505](https://github.com/elastic/eui/pull/4505)) - Fixed invalid color entry passed to `EuiBadge` color prop ([#4481](https://github.com/elastic/eui/pull/4481)) - Fixed `EuiCodeBlock` focus-state if content overflows ([#4463]https://github.com/elastic/eui/pull/4463) diff --git a/src/components/flyout/flyout.tsx b/src/components/flyout/flyout.tsx index af48f2a10e6..0e942953483 100644 --- a/src/components/flyout/flyout.tsx +++ b/src/components/flyout/flyout.tsx @@ -134,7 +134,9 @@ export const EuiFlyout: FunctionComponent = ({ iconType="cross" color="text" aria-label={closeButtonAriaLabel || closeAriaLabel} - onClick={onClose} + onClick={() => { + onClose(); + }} data-test-subj="euiFlyoutCloseButton" /> )}