chakra-ui / ark

Ark UI is a headless UI library with over 45+ components designed to build scalable Design Systems that works for a wide range of JS frameworks.
https://ark-ui.com
MIT License
3.8k stars 109 forks source link

Splitter - crash reading from undefined context when one panel is sufficiently small #2966

Closed Jdyn closed 1 month ago

Jdyn commented 1 month ago

Description

Context becomes undefined after a splitter panel ignores a change in the size prop. Notice in the video there is a minSize on panel b but I am able to resize to zero. This seems to only happen when the panel size is set to be small.

Link to Reproduction (or Detailed Explanation)

This is the same core issue as #2602

Steps to Reproduce

  1. set two panels, panel a size 100, and panel b size 0
  2. resize the panels programmatically, using the size prop (or using setSize I believe)
  3. the new size will be set, but b that was size 0 does not get the updated size
  4. resize b to be zero using the resize trigger, it ignore the size prop
  5. Try to access the splitter context and it is undefined

Ark UI Version

4.0.0

Framework

Browser

Chrome, Edge

Additional Information

No response