Prevent a bunch more stuff from re-rendering

This commit is contained in:
Gregory Schier
2024-12-31 23:24:41 -08:00
parent dfca17f9b7
commit 80119f6574
13 changed files with 211 additions and 174 deletions

View File

@@ -176,7 +176,7 @@ export const Dropdown = forwardRef<DropdownRef, DropdownProps>(function Dropdown
interface ContextMenuProps {
triggerPosition: { x: number; y: number } | null;
className?: string;
items: DropdownItem[];
items: DropdownProps['items'];
onClose: () => void;
}
@@ -201,7 +201,7 @@ export const ContextMenu = forwardRef<DropdownRef, ContextMenuProps>(function Co
isOpen={true} // Always open because we return null if not
className={className}
ref={ref}
items={items}
items={typeof items === 'function' ? items() : items}
onClose={onClose}
triggerShape={triggerShape}
/>

View File

@@ -67,7 +67,7 @@ export function Tabs({
ref={ref}
className={classNames(
className,
'h-full grid grid-rows-[auto_minmax(0,1fr)] grid-cols-1 overflow-x-hidden',
'h-full grid grid-rows-[auto_minmax(0,1fr)] grid-cols-1 ',
)}
>
<div