Skip to content

Commit 4851587

Browse files
committed
[opinionated refactor] Convert EuiSelectableListItem from a class component to a function component
- not sure if this is too extra, I found this easier to grok personally. If it feels too much for this PR, we can revert it or pull it out to a separate PR
1 parent a784e8f commit 4851587

3 files changed

Lines changed: 182 additions & 203 deletions

File tree

src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ exports[`EuiSelectableListItem props tooltip behavior on mouseover 1`] = `
514514
<div>
515515
<li
516516
aria-checked="false"
517-
aria-describedby=""
517+
aria-describedby="generated-id"
518518
class="euiSelectableListItem euiSelectableListItem--paddingSmall"
519519
role="option"
520520
>
@@ -574,7 +574,7 @@ exports[`EuiSelectableListItem props tooltip behavior when isFocused 1`] = `
574574
<div>
575575
<li
576576
aria-checked="false"
577-
aria-describedby=""
577+
aria-describedby="generated-id"
578578
aria-selected="true"
579579
class="euiSelectableListItem euiSelectableListItem-isFocused euiSelectableListItem--paddingSmall"
580580
role="option"

src/components/selectable/selectable_list/selectable_list.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ export class EuiSelectableList<T> extends Component<
398398
event.persist(); // NOTE: This is needed for React v16 backwards compatibility
399399
this.onAddOrRemoveOption(option, event);
400400
}}
401-
ref={ref ? ref.bind(null, index) : undefined}
402401
isFocused={isFocused}
403402
title={searchableLabel || label}
404403
checked={checked}

0 commit comments

Comments
 (0)