From f7696b3f8acee99379557320e68d9bf8543e53c3 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Fri, 25 Oct 2024 17:24:51 +0800 Subject: [PATCH] fix: limit select area --- apps/renderer/src/modules/feed-column/list.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/renderer/src/modules/feed-column/list.tsx b/apps/renderer/src/modules/feed-column/list.tsx index e7da88675d..19811884b5 100644 --- a/apps/renderer/src/modules/feed-column/list.tsx +++ b/apps/renderer/src/modules/feed-column/list.tsx @@ -140,7 +140,6 @@ function FeedListImpl({ className, view }: { className?: string; view: number }) const hasListData = Object.keys(listsData).length > 0 const hasInboxData = Object.keys(inboxesData).length > 0 - const feedsArea = useRef(null) const scrollerRef = useRef(null) const selectoRef = useRef(null) const setSelectedFeedIds = useSetSelectedFeedIds() @@ -184,10 +183,10 @@ function FeedListImpl({ className, view }: { className?: string; view: number }) className="!border-theme-accent-400 !bg-theme-accent-400/60" ref={selectoRef} rootContainer={document.body} - dragContainer={feedsArea.current} + dragContainer={"#feeds-area"} selectableTargets={["[data-feed-id]"]} continueSelect - hitRate={20} + hitRate={10} onSelect={(e) => { const allChanged = [...e.added, ...e.removed] setSelectedFeedIds((prev) => { @@ -261,7 +260,7 @@ function FeedListImpl({ className, view }: { className?: string; view: number }) )} -
+
{(hasListData || hasInboxData) && (