From db639ddbb0c97a9ae7aae38cb1b2ed06e0560b32 Mon Sep 17 00:00:00 2001 From: Lukas Harbarth Date: Wed, 15 Nov 2023 08:07:40 +0100 Subject: [PATCH] fix(FilterBar): display action buttons in same row as filters if toolbar is hidden (#5246) Fixes #5244 --- packages/main/src/components/FilterBar/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/main/src/components/FilterBar/index.tsx b/packages/main/src/components/FilterBar/index.tsx index 712f8ce80be..594575ec45f 100644 --- a/packages/main/src/components/FilterBar/index.tsx +++ b/packages/main/src/components/FilterBar/index.tsx @@ -610,8 +610,8 @@ const FilterBar = forwardRef((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(
); }