Skip to content

Commit

Permalink
Fix check for isPartialFilterInOverflow. Previously code checked cl…
Browse files Browse the repository at this point in the history
…auses and it is impossible to have partial clause. There are only partial items. (#783)
  • Loading branch information
adrianmroz-allegro authored Jul 7, 2021
1 parent f177fbe commit c61047e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/components/filter-tile/filter-tiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ export const FilterTiles: React.SFC<FilterTilesProps> = props => {
if (overflowItems.length <= 0) return <React.Fragment>{visibleItems}</React.Fragment>;

const overflowClauses = clauses.slice(maxItems);

const anyOverflowItemOpen = overflowClauses.some(clause => clause.equals(openedFilterMenu));
const isPartialFilterInOverflow = overflowClauses.some(({ reference }) => partialFilter && reference === partialFilter.dimension.name);
const isPartialFilterInOverflow = overflowItems.some(element => element.type === PartialFilterTile);
const overflowOpened = overflowOpen || anyOverflowItemOpen || isPartialFilterInOverflow;

const filterItemOverflow = <TileOverflowContainer
Expand Down

0 comments on commit c61047e

Please sign in to comment.