Skip to content

Commit

Permalink
Fix dropdown button displaying when there's no content inside
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Nov 28, 2022
1 parent ae66da8 commit b0046fb
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,19 @@ const FilterControls: FC<FilterControlsProps> = ({
}
dropdownTriggerText={t('More filters')}
dropdownTriggerCount={activeOverflowedFiltersInScope}
dropdownContent={() => (
<FiltersDropdownContent
filtersInScope={overflowedFiltersInScope}
filtersOutOfScope={filtersOutOfScope}
renderer={renderer}
showCollapsePanel={showCollapsePanel}
/>
)}
dropdownContent={
overflowedFiltersInScope.length ||
(filtersOutOfScope.length && showCollapsePanel)
? () => (
<FiltersDropdownContent
filtersInScope={overflowedFiltersInScope}
filtersOutOfScope={filtersOutOfScope}
renderer={renderer}
showCollapsePanel={showCollapsePanel}
/>
)
: undefined
}
onOverflowingStateChange={({ overflowed: nextOverflowedIds }) => {
if (
nextOverflowedIds.length !== overflowedIds.length ||
Expand Down

0 comments on commit b0046fb

Please sign in to comment.