Skip to content

Commit

Permalink
use memo for listProps
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed Aug 17, 2021
1 parent 6f9f06a commit ffea64f
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ const SummaryViewSelectorComponent = ({ viewSelected, onViewChange }: SummaryVie
);
}, []);

const listProps = useMemo(
() => ({
rowHeight: 80,
showIcons: true,
}),
[]
);

return (
<EuiPopover
panelPaddingSize="none"
Expand All @@ -140,10 +148,7 @@ const SummaryViewSelectorComponent = ({ viewSelected, onViewChange }: SummaryVie
renderOption={renderOption}
searchable={false}
height={160}
listProps={{
rowHeight: 80,
showIcons: true,
}}
listProps={listProps}
singleSelection={true}
>
{(list) => list}
Expand Down

0 comments on commit ffea64f

Please sign in to comment.