fix(resizable): clip panel group overflow to block programmatic scroll shift

This commit is contained in:
xintaofei
2026-04-23 11:15:05 +08:00
parent 02434b6e1d
commit d7113f6ed0

View File

@@ -6,6 +6,7 @@ import { cn } from "@/lib/utils"
function ResizablePanelGroup({ function ResizablePanelGroup({
className, className,
style,
...props ...props
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) { }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
return ( return (
@@ -14,6 +15,7 @@ function ResizablePanelGroup({
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col", "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
className className
)} )}
style={{ ...style, overflow: "clip" }}
{...props} {...props}
/> />
) )