Skip to content

Commit db639dd

Browse files
authored
fix(FilterBar): display action buttons in same row as filters if toolbar is hidden (#5246)
Fixes #5244
1 parent 0b4ce3a commit db639dd

File tree

1 file changed

+2
-2
lines changed
  • packages/main/src/components/FilterBar

1 file changed

+2
-2
lines changed

packages/main/src/components/FilterBar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ const FilterBar = forwardRef<HTMLDivElement, FilterBarPropTypes>((props, ref) =>
610610
}
611611
const usedSpaceLastRow = filterItemsWidth % filterAreaWidth;
612612
const emptySpaceLastRow = filterAreaWidth - usedSpaceLastRow;
613-
// deduct width of buttons container of the empty space in the last row to calculate number of spacers
614-
const numberOfSpacers = Math.floor((emptySpaceLastRow - filterBarButtonsWidth) / firstChildWidth);
613+
// deduct width of buttons container of the empty space in the last row to calculate number of spacers (-1 because of "lastSpacer")
614+
const numberOfSpacers = Math.floor((emptySpaceLastRow - filterBarButtonsWidth) / firstChildWidth) - 1;
615615
for (let i = 0; i < numberOfSpacers; i++) {
616616
spacers.push(<div key={`filter-spacer-${i}`} className={classes.spacer} />);
617617
}

0 commit comments

Comments
 (0)