Skip to content

scoped_style not work after refresh #267

Open
@CrystalWindSnake

Description

@CrystalWindSnake

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")

Metadata

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