Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
kulgg committed Feb 28, 2024
1 parent 5a15d6c commit bb7ae64
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/app/routes/broker-ui/catalog-page/state/catalog-page-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,21 @@ export class CatalogPageState implements OnDestroy {

@Action(CatalogPage.AddFilterBox)
onAddFilterBox(ctx: Ctx, action: CatalogPage.AddFilterBox) {
let state = ctx.getState();
const state = ctx.getState();
if (action.filterBox.id in state.filters) {
return;
}

state = {
...state,
filters: {
...state.filters,
[action.filterBox.id]: FilterBoxVisibleState.buildVisibleState(
action.filterBox,
),
},
};
state = this._recalculateActiveFilterItems(state);
ctx.setState(state);
ctx.setState(
this._recalculateActiveFilterItems({
...state,
filters: {
...state.filters,
[action.filterBox.id]: FilterBoxVisibleState.buildVisibleState(
action.filterBox,
),
},
}),
);
}

@Action(CatalogPage.UpdateFilterSelectedItems)
Expand Down

0 comments on commit bb7ae64

Please sign in to comment.