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

feat: expose setPosition #23

Merged
merged 1 commit into from Sep 20, 2023
Merged

Conversation

jmredfern
Copy link
Contributor

Enable external programmatic control of the border position.

This is useful in the scenario which the resizable panels are within a resizable container and when the container shrinks the panels can also be resized smaller to maintain minimum size of panels.

@vercel
Copy link

vercel bot commented Sep 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-resizable-layout ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 17, 2023 1:56am

Enable external programmatic control of the border position.
@jmredfern
Copy link
Contributor Author

Hi @RyoSogawa, Is there anything else needed for this to be merged?

@RyoSogawa
Copy link
Owner

@jmredfern
Thanks for the contribution! 🙌 We're planning to release it in the next version soon.

@RyoSogawa RyoSogawa merged commit 9b94e15 into RyoSogawa:main Sep 20, 2023
3 checks passed
@jmredfern
Copy link
Contributor Author

jmredfern commented Sep 21, 2023

Btw @RyoSogawa I implemented a panel resizer using using react-resizeable-layout which has a feature that would be useful in is react-resizeable-layout, which minLeft, minRight. So the separator will not be allowed to move further than minLeft or minRight. (My implmentation was outside of react-resizeable-layout). Maybe something to consider for a future version. Here's props for my resizer which highlights it:

interface usePanelResizerProps {
    initialLeftPanelWidth: number;
    minLeftPanelWidth: number;
    minRightPanelWidth: number;
    containerRef: React.MutableRefObject<HTMLDivElement | null>;
}

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

Successfully merging this pull request may close these issues.

None yet

2 participants