void;
selectedLabel?: string;
}) {
+ const showBranch = depth > 0;
+ const rowSelectable = interactive && item.href === undefined;
+ const rowInteractive = rowSelectable || item.href !== undefined;
const rowActive =
- interactive && selectedLabel !== undefined && item.label === selectedLabel;
+ rowSelectable && selectedLabel !== undefined && item.label === selectedLabel;
+ const childItems = item.children ?? [];
+ const rowContent = (
+ <>
+ {showBranch ?
: null}
+
+ {renderSidebarIcon(item.icon)}
+
+ {item.label}
+ {item.meta ? · {item.meta} : null}
+
+
+ {item.showChevron || (item.children && item.children.length > 0) ? (
+
+
+
+ ) : null}
+ >
+ );
return (
<>
-
onSelect?.(item.label) : undefined}
- style={{ cursor: interactive ? 'pointer' : 'default' }}
- >
- {renderSidebarIcon(item.icon)}
-
- {item.label}
- {item.meta ? · {item.meta} : null}
-
- {item.showChevron || (item.children && item.children.length > 0) ? (
-
-
-
- ) : null}
-
- {item.children && item.children.length > 0 ? (
+ {item.href ? (
+
+ {rowContent}
+
+ ) : (
+
onSelect?.(item.label) : undefined}
+ style={{ cursor: rowInteractive ? 'pointer' : 'default' }}
+ >
+ {rowContent}
+
+ )}
+ {childItems.length > 0 ? (
- {item.children.map((child) => (
+ {childItems.map((child, index) => (
+
- {token.avatarUrl ? (
-
- ) : (
- (token.shortLabel ?? getInitials(token.name))
- )}
+
}
/>
@@ -1413,11 +1616,8 @@ function PersonTokenCell({
) : null}
-
-
-
-
+
);
}
@@ -1468,7 +1668,7 @@ function RelationCellComponent({
hovered: boolean;
}) {
return (
-