fix(knowledge): allow deselecting document category by clicking again

Previously clicking an already-selected category did nothing, forcing
users to refresh the page to view all documents. Now clicking the
active category toggles the selection off, returning to the unfiltered
view.
This commit is contained in:
nullkey
2026-03-31 15:59:19 +08:00
committed by lyingbug
parent 0b64ef9bd1
commit 1151d90bb9
2 changed files with 5 additions and 1 deletions
@@ -396,7 +396,10 @@ const handleTagRowClick = (tagId: string) => {
editingTagId.value = null;
editingTagName.value = '';
}
if (selectedTagId.value === tagId) return;
if (selectedTagId.value === tagId) {
handleTagFilterChange('');
return;
}
handleTagFilterChange(tagId);
};
@@ -1650,6 +1650,7 @@ const handleTagRowClick = (tagSeqId: number) => {
cancelCreateTag()
}
if (selectedTagId.value === tagSeqId) {
handleTagFilterChange(0)
return
}
handleTagFilterChange(tagSeqId)