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

Is it possible to toggle between vertical and horizontal orientation? #457

Open
MA-MacDonald opened this issue Oct 10, 2022 · 6 comments
Open

Comments

@MA-MacDonald
Copy link

I'm trying to change the vertical prop when clicking a button to switch between vertical and horizontal orientation. Is this possible?

When I try changing the vertical prop it doesn't seem to like that and the layout gets all messed up.

@daric81
Copy link

daric81 commented Oct 19, 2022

First up , many thanks for this great library!

@MA-MacDonald I am having the same issue. Adding key={vertical} to the Allotment component does fix the layout, but resets the internal state for my panel content so its a no go for me.

Is there any plan to fix this?

@horacioh
Copy link

thanks @daric81 for your suggestion! it does work for me :)

maybe in your situation what you could do is to attach to the onChange function and store the values outside, so when you change the orientation, can set the values back to what they were?

@daric81
Copy link

daric81 commented Oct 21, 2022

@horacioh Glad you're sorted! Thanks for the suggestion. I'm already storing size values in local storage for vertical / horizontal and this doesn't work for me, there's still a layout issue without key={vertical}.

Repository owner deleted a comment from johnmwalley Oct 26, 2022
@johnwalley
Copy link
Owner

Hi! Sorry I've not replied sooner. I have started working on this feature (tracked by #341) but I don't have much spare time right now. I'd expect something to be ready in November.

One of the challenges is deciding what to do with the sizes and props when switching orientation. Nothing insurmountable but I'm sure you can appreciate it isn't trivial to implement.

Thanks for your patience 🙏

@johnwalley
Copy link
Owner

Update: I have not forgotten about this issue but can't give an deadline on it being completed just now.

@elewin
Copy link

elewin commented Jul 1, 2024

This would be awesome

analogrelay added a commit to Azure/cosmos-explorer that referenced this issue Aug 9, 2024
analogrelay added a commit to Azure/cosmos-explorer that referenced this issue Aug 9, 2024
analogrelay added a commit to Azure/cosmos-explorer that referenced this issue Aug 9, 2024
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

5 participants