Skip to content

scoped_style not work after refresh #267

Open
@CrystalWindSnake

Description

Click the button and the background color is not red.

from nicegui import ui
from ex4nicegui import rxui, effect_refreshable, to_ref


@ui.page("/")
def page():
    value = to_ref(True)

    ui.button("switch", on_click=lambda: value.set_value(not value.value))

    @effect_refreshable.on(value)
    def _():
        with rxui.card().scoped_style("*", "background-color: red;"):
            ui.label("text1")

Activity

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

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions