Skip to content
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

onResize returns percentages instead of pixels when pixels are used #180

Closed
hipstersmoothie opened this issue Aug 13, 2023 · 4 comments
Closed

Comments

@hipstersmoothie
Copy link
Contributor

https://codesandbox.io/s/react-resizable-panels-forked-z3hp8h?file=/src/App.js

@simpslandyy
Copy link

I'm also experiencing this problem. Is there an estimated time this will get addressed?

@bvaughn
Copy link
Owner

bvaughn commented Aug 25, 2023

Is there an estimated time this will get addressed?

No. This is not a for-profit package so there's no SLA 😉

It should be fixed once I have time to finish #182

@simpslandyy
Copy link

Is there an estimated time this will get addressed?

No. This is not a for-profit package so there's no SLA 😉

It should be fixed once I have time to finish #182

No worries thank you! 👍🏽

@bvaughn
Copy link
Owner

bvaughn commented Nov 12, 2023

This has been resolved by #182 which I plan to publish later this afternoon. The onResize method will now receive the following:

type MixedSizes = {
  sizePercentage: number;
  sizePixels: number;
}

onResize(
  current: MixedSize,
  prev: MixedSize)
);

@bvaughn bvaughn closed this as completed Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants