-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Splitter - Set-Size example buggy / crashes #2261
Comments
This issue does mention ArkUI 3.3.0, its really old version per my opinion. |
Oh? I may try to reproduce it this weekend with current v4.2.0. |
Hey @segunadebayo any update on this? We're still encountering this, which is further described in chakra-ui/ark#2967. Still occurs on the latest version. |
Has any progress been made on this bug? |
This has been fixed in Zag.js and will reflect in Ark shortly. When it's done, you can use <div {...api().getRootProps()}>
<div {...api().getPanelProps({ id: "a" })}>
<button
type='button'
onClick={() =>
api().setSizes([
{ id: "a", size: 10 },
{ id: "b", size: 90 },
])
}
>
Set to 10%
</button>
<p>A</p>
</div>
<div {...api().getResizeTriggerProps({ id: "a:b" })} />
<div {...api().getPanelProps({ id: "b" })}>
<button
type='button'
onClick={() =>
api().setSizes([
{ id: "a", size: 90 },
{ id: "b", size: 10 },
])
}
>
Set to 10%
</button>
<p>B</p>
</div>
</div> |
Description
When I do
api().setSize("a", 10)
I expect the panel to get resized to 10% of the size.It doesn't do that consistently, just hitting the buttons makes the UI unresponsive.
Additionally: resizing a panel to under 10% and then setting the size to 10% throws an exception that the total is over 100%:
this breaks mouseover of the handle since state.context becomes undefined.
Link to Reproduction (or Detailed Explanation)
(video)
Steps to Reproduce
set-size.mp4
(Code from https://ark-ui.com/react/docs/components/splitter)
Ark UI Version
3.3.0
Framework
Browser
Electron 29.1.5
Additional Information
No response
The text was updated successfully, but these errors were encountered: