mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 09:18:30 +02:00
Fix drop marker
This commit is contained in:
@@ -432,10 +432,13 @@ function TreeInner<T extends { id: string }>(
|
|||||||
'[&:focus-within]:[&_.tree-item.selected]:bg-surface-active',
|
'[&:focus-within]:[&_.tree-item.selected]:bg-surface-active',
|
||||||
'[&:not(:focus-within)]:[&_.tree-item.selected]:bg-surface-highlight',
|
'[&:not(:focus-within)]:[&_.tree-item.selected]:bg-surface-highlight',
|
||||||
|
|
||||||
// Round the items, but only if the ends of the selection
|
// Round the items, but only if the ends of the selection.
|
||||||
|
// Also account for the drop marker being in between items
|
||||||
'[&_.tree-item]:rounded-md',
|
'[&_.tree-item]:rounded-md',
|
||||||
'[&_.tree-item.selected+.tree-item.selected]:rounded-t-none',
|
'[&_.tree-item.selected+.tree-item.selected]:rounded-t-none',
|
||||||
|
'[&_.tree-item.selected+.drop-marker+.tree-item.selected]:rounded-t-none',
|
||||||
'[&_.tree-item.selected:has(+.tree-item.selected)]:rounded-b-none',
|
'[&_.tree-item.selected:has(+.tree-item.selected)]:rounded-b-none',
|
||||||
|
'[&_.tree-item.selected:has(+.drop-marker+.tree-item.selected)]:rounded-b-none',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<TreeItemList nodes={selectableItems} treeId={treeId} {...treeItemListProps} />
|
<TreeItemList nodes={selectableItems} treeId={treeId} {...treeItemListProps} />
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const TreeDropMarker = memo(function TreeDropMarker({
|
|||||||
if (collapsed) return null;
|
if (collapsed) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ paddingLeft: `${parentDepth}rem` }}>
|
<div className="drop-marker" style={{ paddingLeft: `${parentDepth}rem` }}>
|
||||||
<DropMarker className={classNames(className)} />
|
<DropMarker className={classNames(className)} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user