Skip to content

Commit

Permalink
fix(FilterBar): display action buttons in same row as filters if tool…
Browse files Browse the repository at this point in the history
…bar is hidden (#5246)

Fixes #5244
  • Loading branch information
Lukas742 authored Nov 15, 2023
1 parent 0b4ce3a commit db639dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/main/src/components/FilterBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,8 @@ const FilterBar = forwardRef<HTMLDivElement, FilterBarPropTypes>((props, ref) =>
}
const usedSpaceLastRow = filterItemsWidth % filterAreaWidth;
const emptySpaceLastRow = filterAreaWidth - usedSpaceLastRow;
// deduct width of buttons container of the empty space in the last row to calculate number of spacers
const numberOfSpacers = Math.floor((emptySpaceLastRow - filterBarButtonsWidth) / firstChildWidth);
// deduct width of buttons container of the empty space in the last row to calculate number of spacers (-1 because of "lastSpacer")
const numberOfSpacers = Math.floor((emptySpaceLastRow - filterBarButtonsWidth) / firstChildWidth) - 1;
for (let i = 0; i < numberOfSpacers; i++) {
spacers.push(<div key={`filter-spacer-${i}`} className={classes.spacer} />);
}
Expand Down

0 comments on commit db639dd

Please sign in to comment.