Closed DenizUgur closed 7 months ago
Thanks for the repro. I will try to take a look sometime soon.
Okay found the problem, my outermost panel group had the same id despite the layout's change. Replacing it with unique ID or crypto.randomUUID()
solved the problem.
key
must also be unique
Possibly a check for duplicate id's across re-render could be implemented?
That's interesting. Even with the same id, layouts should be stored uniquely based on the group id and the combination of panel constraints (so if you conditionally rendered panels, they don't clobber each others layouts).
Would you be able to reduce your repro to a failing unit test (in this repo)? That would help me fix it.
Let me try to do that. I'll try open a PR today
Thank you! That would be super helpful.
Fix published in 2.0.10
Hi @bvaughn, first of all thank you for this amazing library. It has been a core feature for my project. In my project, I'm using resizable panels dynamically. As in, there are a set of layouts with size constraints defined in them as well. When I switch between layouts I get an assertion error. I've found out this is due to
minSize
andmaxSize
being supplied. Most probably I'm not using them as they should so I would love it if you could shine a light on this.Here is a repro: https://codesandbox.io/p/sandbox/youthful-jennings-wt9ffk