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

make ui.tab_panels can work with other components #1897

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

CrystalWindSnake
Copy link
Contributor

This PR make tab_panels can work with other components, not just tabs. It is based on this discussion #1894.

Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks, @CrystalWindSnake!

I tested it successfully with this code:

s = ui.select(['one', 'two'])

with ui.tab_panels().bind_value_from(s):
    with ui.tab_panel('one'):
        ui.label('First tab')
    with ui.tab_panel('two'):
        ui.label('Second tab')

@falkoschindler falkoschindler added the enhancement New feature or request label Oct 27, 2023
@falkoschindler falkoschindler added this to the 1.4.2 milestone Oct 27, 2023
@falkoschindler falkoschindler merged commit 7899abb into zauberzeug:main Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants