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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user