[PATCH proxmox-yew-comp v2 16/25] RRDGrid: fix size observer by attaching node reference to rendered container

Lukas Wagner
2026-03-19T09:46:58Z

Without it, the cast to web_sys::Element does not return anything and
the DomSizeObserver is never initialized.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
Tested-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
src/rrd_grid.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rrd_grid.rs b/src/rrd_grid.rs
index 354f1bf..10f1db7 100644
--- a/src/rrd_grid.rs
+++ b/src/rrd_grid.rs
@@ -77,7 +77,7 @@ impl Component for ProxmoxRRDGrid {
.children(props.children.clone()),
)
.with_child(html! { })
- .into()
+ .into_html_with_ref(self.node_ref.clone())
}

fn rendered(&mut self, ctx: &Context<Self>, first_render: bool) {
--
2.47.3