mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-05 08:03:28 +00:00
fix(Explorer): Added unhighlightning when clicking outside a file
This commit is contained in:
parent
5b78bbbb7d
commit
3a2e34664c
|
@ -117,7 +117,20 @@ export const VirtualizedList = memo(({ data, context, onScroll }: Props) => {
|
|||
|
||||
return (
|
||||
<div style={{ marginTop: -TOP_BAR_HEIGHT }} className="w-full pl-2 cursor-default">
|
||||
<div ref={scrollRef} className="h-screen custom-scroll explorer-scroll">
|
||||
<div
|
||||
ref={scrollRef}
|
||||
className="h-screen custom-scroll explorer-scroll"
|
||||
onClick={(e) => {
|
||||
if (
|
||||
!scrollRef.current ||
|
||||
(!(e.target as HTMLElement).classList.contains('file-row') &&
|
||||
scrollRef.current !== e.target)
|
||||
)
|
||||
return;
|
||||
|
||||
getExplorerStore().selectedRowIndex = -1;
|
||||
}}
|
||||
>
|
||||
<div
|
||||
ref={innerRef}
|
||||
style={{
|
||||
|
@ -132,7 +145,7 @@ export const VirtualizedList = memo(({ data, context, onScroll }: Props) => {
|
|||
height: `${virtualRow.size}px`,
|
||||
transform: `translateY(${virtualRow.start}px)`
|
||||
}}
|
||||
className="absolute top-0 left-0 flex w-full"
|
||||
className="file-row absolute top-0 left-0 flex w-full"
|
||||
key={virtualRow.key}
|
||||
>
|
||||
{explorerStore.layoutMode === 'list' ? (
|
||||
|
|
Loading…
Reference in a new issue