Skip to content

Weird interaction between Switcher and Grid #215

@Aran-Fey

Description

@Aran-Fey

Describe the bug

The animation of a Switcher somehow affects the layout of its parent Grid.

Steps to Reproduce

class Demo(rio.Component):
    is_on: bool = False
    
    def build(self) -> rio.Component:
        return rio.Grid(
            [
                rio.Switch(is_on=self.bind().is_on),
                rio.Text('foo', align_x=0, grow_x=True),
            ],
            [rio.Switcher(rio.Text('Hello') if self.is_on else None)],
            min_width=10,
        )

Screenshots/Videos

No response

Operating System

No response

What browsers are you seeing the problem on?

No response

Browser version

No response

What device are you using?

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions