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

Dynamic layout manipulation, add/remove container objects #1927

Open
zokrezyl opened this issue Oct 12, 2024 · 3 comments
Open

Dynamic layout manipulation, add/remove container objects #1927

zokrezyl opened this issue Oct 12, 2024 · 3 comments

Comments

@zokrezyl
Copy link

Hi,

Likely not easy to implement, but I think it would be great feature to be able to dynamically add/remove layout container objects, like one would split window in vim/nvim.

What is the best way at the moment?

I would like for instance to start from PromptSession and add new components to it.

Thanks,
Z

@nitanmarcel
Copy link

Assigning .layout to the Application instance will add a new layout with any changes that have been made in the layout

@zokrezyl
Copy link
Author

yeap, found out, also worked to add children to containers. However it is unfortunatelly not documented well.

I guess we can close then this one, unless you want to keep it till doc is updated, just few words.

Thanks
Z

@nitanmarcel
Copy link

yeap, found out, also worked to add children to containers. However it is unfortunatelly not documented well.

I guess we can close then this one, unless you want to keep it till doc is updated, just few words.

Thanks Z

Well it's already documented kinda.

What this does is, the layout is accessed every time everything is redrawn. So what happens is after you replace the layout in the next draw it accesses it again, displaying the replaced instance instead of the old one

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

2 participants