Skip to content

Commit

Permalink
fix: limit select area
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Oct 25, 2024
1 parent 3af3935 commit f7696b3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/renderer/src/modules/feed-column/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLDivElement>(null)
const scrollerRef = useRef<HTMLDivElement>(null)
const selectoRef = useRef<Selecto>(null)
const setSelectedFeedIds = useSetSelectedFeedIds()
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -261,7 +260,7 @@ function FeedListImpl({ className, view }: { className?: string; view: number })
</>
)}

<div ref={feedsArea} className="space-y-px">
<div className="space-y-px" id="feeds-area">
{(hasListData || hasInboxData) && (
<div
className={cn(
Expand Down

0 comments on commit f7696b3

Please sign in to comment.