Skip to content

Commit

Permalink
FiltersStack
Browse files Browse the repository at this point in the history
  • Loading branch information
carkom committed Jan 27, 2024
1 parent be08c73 commit bde4313
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/accounts/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Search } from '../common/Search';
import { Stack } from '../common/Stack';
import { View } from '../common/View';
import { FilterButton } from '../filters/FiltersMenu';
import { FiltersStack } from '../filters/SavedFilters';
import { FiltersStack } from '../filters/FiltersStack';
import { KeyHandlers } from '../KeyHandlers';
import { NotesButton } from '../NotesButton';
import { SelectedTransactionsButton } from '../transactions/SelectedTransactions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,6 @@ function FilterExpression({

export function AppliedFilters({
filters,
editingFilter,
onUpdate,
onDelete,
conditionsOp,
Expand All @@ -616,7 +615,6 @@ export function AppliedFilters({
op={filter.op}
value={filter.value}
options={filter.options}
editing={editingFilter === filter}
onChange={newFilter => onUpdate(filter, newFilter)}
onDelete={() => onDelete(filter)}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import React from 'react';

import { type RuleConditionEntity } from 'loot-core/types/models/rule';

import { Stack } from '../common/Stack';
import { View } from '../common/View';

import { AppliedFilters } from './FiltersMenu';
import { SavedFilterMenuButton } from './SavedFilterMenuButton';
import {
type SavedFilter,
SavedFilterMenuButton,
} from './SavedFilterMenuButton';

export function FiltersStack({
filters,
Expand All @@ -16,6 +21,19 @@ export function FiltersStack({
filterId,
filtersList,
onCondOpChange,
}: {
filters: RuleConditionEntity[];
conditionsOp: string;
onUpdateFilter: (
filter: RuleConditionEntity,
newFilter: RuleConditionEntity,
) => RuleConditionEntity;
onDeleteFilter: (filter: RuleConditionEntity) => void;
onClearFilters: () => void;
onReloadSavedFilter: () => void;
filterId: SavedFilter;
filtersList: RuleConditionEntity[];
onCondOpChange: () => void;
}) {
return (
<View>
Expand Down

0 comments on commit bde4313

Please sign in to comment.