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

Splits should accept an atom to store the split state #177

Open
Frozenlock opened this issue Apr 11, 2018 · 2 comments
Open

Splits should accept an atom to store the split state #177

Frozenlock opened this issue Apr 11, 2018 · 2 comments

Comments

@Frozenlock
Copy link
Contributor

:initial-split only accepts a double or a string.
This means that every time the component is re-rendered (say with figwheel), it returns to the hard-coded value. This also prevents the user from having his preferred split saved in local storage for future uses.

Furthermore, if one uses :on-split-change to store the split value and deref it in :initial-split, it causes the panels to be re-rendered when the user changes the split.

@jsa-aerial
Copy link

First, thanks so much for re-com - it has been awesome for me (a non-CSS/flex wizard...)

Now on having an atom for the split state. Another thing this can be used for is 'closing' and 'opening' panels. This is the typical scenario where you have '<<' and '>>' buttons which would set the split % to 0 (or 100) and set back to initial (or previous) in one action - no sliding. Would be really nice. Any chance of this moving forward any time soon??

@jsa-aerial
Copy link

Actually, it looks like this is already done - split-perc ratom already holds the split percent value. So, would only need to test if user supplies a ratom instead of a value when binding split-perc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants