Skip to content

Commit

Permalink
[EuiSelectableList[Item]] Fix showIcons prop (#4920)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos authored Jun 24, 2021
1 parent 9ccc0c4 commit 0d9a270
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/selectable/selectable_custom_render.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default () => {
searchableLabel: `${country.name} ${'I am secondary content, I am!'}`,
prepend: country.flag,
append: <EuiBadge>{country.code}</EuiBadge>,
showIcons: false,
};
});

Expand Down
5 changes: 2 additions & 3 deletions src/components/selectable/selectable_list/selectable_list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@ export class EuiSelectableList<T> extends Component<EuiSelectableListProps<T>> {
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)
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export type EuiSelectableListItemProps = LiHTMLAttributes<HTMLLIElement> &
/**
* Shows icons based on `checked` type
*/
showIcons: boolean;
showIcons?: boolean;
/**
* Highlights the item for pseudo focus
*/
Expand Down

0 comments on commit 0d9a270

Please sign in to comment.