From 827cb18bcdcaf07ab88460941b25e28aaa42fa93 Mon Sep 17 00:00:00 2001 From: cchaos Date: Thu, 24 Jun 2021 10:40:23 -0400 Subject: [PATCH 1/3] [EuiSelectableListItem] Fix `showIcons` prop --- .../selectable/selectable_list/selectable_list.tsx | 5 ++--- .../selectable/selectable_list/selectable_list_item.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/selectable/selectable_list/selectable_list.tsx b/src/components/selectable/selectable_list/selectable_list.tsx index 0acd005daed..b1613de8eff 100644 --- a/src/components/selectable/selectable_list/selectable_list.tsx +++ b/src/components/selectable/selectable_list/selectable_list.tsx @@ -247,9 +247,8 @@ export class EuiSelectableList extends Component> { aria-setsize={data.length - labelCount} onFocusBadge={this.props.onFocusBadge} allowExclusions={this.props.allowExclusions} - // @ts-ignore complex - {...(optionRest as EuiSelectableListItemProps)} - showIcons={this.props.showIcons}> + showIcons={this.props.showIcons} + {...(optionRest as EuiSelectableListItemProps)}> {this.props.renderOption ? ( this.props.renderOption(option, this.props.searchValue) ) : ( diff --git a/src/components/selectable/selectable_list/selectable_list_item.tsx b/src/components/selectable/selectable_list/selectable_list_item.tsx index b195e210a55..cb181d836d9 100644 --- a/src/components/selectable/selectable_list/selectable_list_item.tsx +++ b/src/components/selectable/selectable_list/selectable_list_item.tsx @@ -47,7 +47,7 @@ export type EuiSelectableListItemProps = LiHTMLAttributes & /** * Shows icons based on `checked` type */ - showIcons: boolean; + showIcons?: boolean; /** * Highlights the item for pseudo focus */ From 4023b5e4510906c384a35275d9bb226a45a73452 Mon Sep 17 00:00:00 2001 From: cchaos Date: Thu, 24 Jun 2021 10:51:15 -0400 Subject: [PATCH 2/3] Doc update --- src-docs/src/views/selectable/selectable_custom_render.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src-docs/src/views/selectable/selectable_custom_render.js b/src-docs/src/views/selectable/selectable_custom_render.js index f5f6bbf316c..2958405517e 100644 --- a/src-docs/src/views/selectable/selectable_custom_render.js +++ b/src-docs/src/views/selectable/selectable_custom_render.js @@ -19,6 +19,7 @@ export default () => { searchableLabel: `${country.name} ${'I am secondary content, I am!'}`, prepend: country.flag, append: {country.code}, + showIcons: false, }; }); From 89a22d6c4292e694982c2e66ad6a9b8884f4f4d4 Mon Sep 17 00:00:00 2001 From: cchaos Date: Thu, 24 Jun 2021 10:54:06 -0400 Subject: [PATCH 3/3] cl --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87e3f967243..104f5cb1a11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `34.5.0`. +**Bug fixes** + +- Fixed `showIcons` prop in `EuiSelectableListItem` ([#4920](https://github.com/elastic/eui/pull/4920)) ## [`34.5.0`](https://github.com/elastic/eui/tree/v34.5.0)