diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bd64ee29f3..656f74fab50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `9.6.0`. +- Changed `EuiNavDrawer` to close on any list item click ([#1770](https://github.com/elastic/eui/pull/1770)) ## [`9.6.0`](https://github.com/elastic/eui/tree/v9.6.0) diff --git a/src/components/list_group/__snapshots__/list_group_item.test.js.snap b/src/components/list_group/__snapshots__/list_group_item.test.js.snap index 83d3ae2f022..8cdbac774c8 100644 --- a/src/components/list_group/__snapshots__/list_group_item.test.js.snap +++ b/src/components/list_group/__snapshots__/list_group_item.test.js.snap @@ -308,19 +308,3 @@ exports[`EuiListGroupItem throws an warning if both iconType and icon are provid `; - -exports[`EuiListGroupItem throws an warning if both onClick and href are provided but still renders 1`] = ` -
  • - - - -
  • -`; diff --git a/src/components/list_group/list_group_item.js b/src/components/list_group/list_group_item.js index e15ed76617f..09c4c5bbc51 100644 --- a/src/components/list_group/list_group_item.js +++ b/src/components/list_group/list_group_item.js @@ -92,15 +92,11 @@ export const EuiListGroupItem = ({ if (href && !isDisabled) { itemContent = ( - + {iconNode} {labelContent} ); - - if (onClick) { - console.warn('Both `href` and `onClick` were passed to EuiListGroupItem but only one can exist. The `href` was used.'); - } } else if ((href && isDisabled) || onClick) { itemContent = (