feat: expand collapse category by double-clicking (#995)

This commit is contained in:
Przeblysk 2024-10-18 07:53:07 +08:00 committed by GitHub
parent 9d5f2c908e
commit a44fe98cba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ function FeedCategoryImpl({ data: ids, view, categoryOpenStateData }: FeedCatego
const itemsRef = useRef<HTMLDivElement>(null)
const toggleCategoryOpenState = (e: React.MouseEvent<HTMLButtonElement>) => {
const toggleCategoryOpenState = (e: React.MouseEvent<HTMLButtonElement | HTMLDivElement>) => {
e.stopPropagation()
if (!isCategoryEditing) {
setCategoryActive()
@ -256,7 +256,7 @@ function FeedCategoryImpl({ data: ids, view, categoryOpenStateData }: FeedCatego
)
}}
>
<div className="flex w-full min-w-0 items-center">
<div className="flex w-full min-w-0 items-center" onDoubleClick={toggleCategoryOpenState}>
<button
type="button"
onClick={toggleCategoryOpenState}