Added rsx element fields #20

This commit is contained in:
2025-08-02 12:19:04 -05:00
parent 35dcc4d22c
commit d9d107bd80
5 changed files with 34 additions and 26 deletions
+5 -2
View File
@@ -173,13 +173,16 @@ impl Widget {
pub fn inject<F: FnMut(WidgetLoad) -> WidgetLoad + 'static + Send + Sync>(
self: &Arc<Self>,
f: F,
mut f: F,
) {
match &**self {
Widget::Dynamic(w) => {
w.inject(f);
}
Widget::Static(_) => {}
Widget::Static(w) => {
let wl = WidgetLoad::new(String::new());
w.1.lock().unwrap().extend(f(wl).1);
}
}
}