Highlight selected item

This commit is contained in:
Oliver Walters 2026-06-19 01:20:26 +00:00
parent d7219cc9c5
commit 49710e9e0c
1 changed files with 4 additions and 0 deletions

View File

@ -220,6 +220,8 @@ export default function NavigationTree({
? !!(childIdentifier && resolveItem(payload.node, childIdentifier))
: nodeInfo.children.length > 0;
const isSelected = nodeInfo.selected === true;
return (
<Group
p={3}
@ -227,6 +229,8 @@ export default function NavigationTree({
justify='left'
key={payload.node.value}
wrap='nowrap'
bg={isSelected ? 'var(--mantine-primary-color-light)' : undefined}
style={{ borderRadius: 'var(--mantine-radius-sm)' }}
onClick={() => {
if (!hasChildren) return;
if (!debouncedSearch && !isFetched) {