Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
romgrk committed Aug 11, 2023
1 parent a42ae12 commit f1d05aa
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type GridTypeFilterInputValueProps = GridFilterInputValueProps &
isFilterActive?: boolean;
};

type ItemPlusTag = GridFilterItem & { fromInput?: boolean };
type ItemPlusTag = GridFilterItem & { fromInput?: string };

function GridFilterInputValue(props: GridTypeFilterInputValueProps) {
const {
Expand Down Expand Up @@ -47,7 +47,7 @@ function GridFilterInputValue(props: GridTypeFilterInputValueProps) {

setIsApplying(true);
filterTimeout.start(rootProps.filterDebounceMs, () => {
const newItem = { ...item, value, fromInput: true };
const newItem = { ...item, value, fromInput: id! };
applyValue(newItem);
setIsApplying(false);
});
Expand All @@ -57,7 +57,7 @@ function GridFilterInputValue(props: GridTypeFilterInputValueProps) {

React.useEffect(() => {
const itemPlusTag = item as ItemPlusTag;
if (!itemPlusTag.fromInput) {
if (itemPlusTag.fromInput !== id) {
setFilterValueState(String(item.value ?? ''));
}
}, [item]);
Expand Down

0 comments on commit f1d05aa

Please sign in to comment.