Skip to content

Commit

Permalink
perf(dashboard): fix filter-box performance bug (#16702)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenLYZ authored Sep 15, 2021
1 parent 7f804d6 commit b0ac5d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion superset-frontend/src/components/Select/DeprecatedSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,15 @@ function styled<
if (forceOverflow) {
Object.assign(restProps, {
closeMenuOnScroll: (e: Event) => {
// ensure menu is open
const menuIsOpen = (stateManager as BasicSelect<OptionType>)?.state
?.menuIsOpen;
const target = e.target as HTMLElement;
return target && !target.classList?.contains('Select__menu-list');
return (
menuIsOpen &&
target &&
!target.classList?.contains('Select__menu-list')
);
},
menuPosition: 'fixed',
});
Expand Down

0 comments on commit b0ac5d1

Please sign in to comment.