Skip to content
Discussion options

You must be logged in to vote

Here is what you have at the moment:

@ui.refreshable
def content(text: str):
    ui.button("Menu", on_click=drawer.toggle).classes("lg:hidden")
    ui.label(text)

with ui.left_drawer(bordered=True) as drawer:
    ui.button("A", on_click=lambda: content.refresh("A"))
    ui.button("B", on_click=lambda: content.refresh("B"))
    ui.button("C", on_click=lambda: content.refresh("C"))

content('Hi!')

Duplicating the buttons as suggested above would look like this:

@ui.refreshable
def content(text: str):
    ui.button("Menu", on_click=drawer.toggle).classes("lg:hidden")
    ui.label(text)

with ui.left_drawer(bordered=True) as drawer:
    with ui.column().classes('max-lg:hidden'):
        ui.b…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ruisilvestre-snapp
Comment options

Comment options

You must be logged in to vote
1 reply
@ruisilvestre-snapp
Comment options

Answer selected by ruisilvestre-snapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants