mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 07:41:22 +02:00
Fix sidebar scroll
This commit is contained in:
@@ -153,8 +153,9 @@ export const Sidebar = memo(function Sidebar({ className }: Props) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div aria-hidden={hidden} className="h-full grid grid-rows-[auto_minmax(0,1fr)]">
|
<div aria-hidden={hidden} className="h-full">
|
||||||
<div
|
<VStack
|
||||||
|
as="ul"
|
||||||
role="menu"
|
role="menu"
|
||||||
aria-orientation="vertical"
|
aria-orientation="vertical"
|
||||||
dir="ltr"
|
dir="ltr"
|
||||||
@@ -164,23 +165,17 @@ export const Sidebar = memo(function Sidebar({ className }: Props) {
|
|||||||
tabIndex={hidden ? -1 : 0}
|
tabIndex={hidden ? -1 : 0}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
className,
|
className,
|
||||||
'h-full grid grid-rows-[auto_minmax(0,1fr)_auto]',
|
'h-full pb-3 overflow-y-scroll overflow-x-visible pt-2',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<VStack
|
<SidebarItems
|
||||||
as="ul"
|
selectedIndex={selectedIndex}
|
||||||
className="pb-3 overflow-y-auto overflow-x-visible pt-2"
|
requests={requests}
|
||||||
draggable={false}
|
focused={hasFocus}
|
||||||
>
|
onSelect={handleSelect}
|
||||||
<SidebarItems
|
onClearSelected={handleClearSelected}
|
||||||
selectedIndex={selectedIndex}
|
/>
|
||||||
requests={requests}
|
</VStack>
|
||||||
focused={hasFocus}
|
|
||||||
onSelect={handleSelect}
|
|
||||||
onClearSelected={handleClearSelected}
|
|
||||||
/>
|
|
||||||
</VStack>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -193,7 +188,13 @@ interface SidebarItemsProps {
|
|||||||
onClearSelected: () => void;
|
onClearSelected: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SidebarItems({ requests, focused, selectedIndex, onSelect, onClearSelected }: SidebarItemsProps) {
|
function SidebarItems({
|
||||||
|
requests,
|
||||||
|
focused,
|
||||||
|
selectedIndex,
|
||||||
|
onSelect,
|
||||||
|
onClearSelected,
|
||||||
|
}: SidebarItemsProps) {
|
||||||
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
||||||
const updateRequest = useUpdateAnyRequest();
|
const updateRequest = useUpdateAnyRequest();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user