We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 442a37d commit bc17835Copy full SHA for bc17835
1 file changed
apps/web/src/components/memo-editor-form.tsx
@@ -824,7 +824,8 @@ export const MemoEditorForm = view(
824
};
825
826
const handleSelectCategory = (categoryId: string | null) => {
827
- setSelectedCategoryId(categoryId);
+ // 点击已选中的分类时取消选中
828
+ setSelectedCategoryId(categoryId !== null && categoryId === selectedCategoryId ? null : categoryId);
829
setIsCategoryDropdownOpen(false);
830
831
0 commit comments