Replies: 1 comment
-
Seems like rendering |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I use Nextjs App router and need to determine if the panel should be collapsed on a per-route basis.
Here is my problem:
On my route /customers I need the panel to be collapsed=false, but on the route /customers/[customerId] I need the panel to be collapsed=true by default. My desired outcome would be to render this on the server, where I pass the collapsed on a per-route basis. My PanelGroup is contained in the base path /customers. I tried to alter the cookies like so on my /customers/[customerId] route:
cookies().set("react-resizable-panels:collapsed", "false")
, but nextjs doesnt allow this:another approach could be to alter this with a provider or use a useeffect in a client component on mount to set the cookie, but this will lose the non-flicker ability by server rendering.
Is there any way I can make this work that I overlook at the moment?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions