rio icon indicating copy to clipboard operation
rio copied to clipboard

[BUG]: IconButton in Popup shrinks to zero size if popup is not open by default

Open Julien-Schneider opened this issue 6 months ago • 1 comments

Describe the bug

If there is an IconButton within the content of a popup, it will shrink to 0 though space in the popup container is reserved for the IconButton.

If however the Popup is open by default the IconButton will show as expected.

Steps to Reproduce

Minimal Example:

class Test(rio.Component):
    _open: bool = False

    def build(self) -> rio.Component:
        anchor = rio.IconButton("rocket", align_x=0.5, on_press=self.toggle_open)
        content = rio.Column(
            rio.Text("Text and Icon works"),
            rio.Icon("check_small"),
            rio.IconButton("error")
        )

        return rio.Popup(anchor=anchor, content=content, is_open=self._open, position="bottom")
                         
    def toggle_open(self):
        self._open = not self._open

Screenshots/Videos

grafik

Operating System

Windows

What browsers are you seeing the problem on?

Firefox, Edge

Browser version

No response

What device are you using?

Desktop

Additional context

No response

Julien-Schneider avatar Sep 01 '24 13:09 Julien-Schneider