Skip to content

Commit

Permalink
fix(TagComboBox): deleted tags are not returned after being deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
troff8 authored and Troff8 committed Jun 30, 2023
1 parent 7f61562 commit 2e0e6e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/TagComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ export const TagComboBox = React.forwardRef<HTMLDivElement, TagComboBoxProps>(
await createTag();
return;
}
const newTags = [...tags, tag];
const newTags = [...value, tag];
setTags(newTags);
onChange?.(newTags);
setInputState('');
},
[onChange, tags, suggestions.data, createTag],
[onChange, value, suggestions.data, createTag],
);

const filterIds = value.map((t) => t.id);
Expand Down

0 comments on commit 2e0e6e6

Please sign in to comment.