feat: add eval_ignore prop to all widgets

This commit is contained in:
Byson94
2025-12-30 09:25:00 +05:30
parent ff9db50831
commit 29983ab9da
2 changed files with 7 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- `text` and `show_text` property to progressbar widget.
- `content_fit` property to image widget.
- `can_shrink` property to image widget.
- `mutations` property to localsignal.
- `eval_ignore` property to all widgets.
### Fixed

View File

@@ -202,6 +202,11 @@ impl WidgetRegistry {
}
pub fn update_props(&self, widget_id: u64, new_props: Map) {
let ei = get_bool_prop(&new_props, "eval_ignore", Some(false)).unwrap_or(false);
if ei {
return;
}
if let Some(entry) = self.widgets.get(&widget_id) {
(entry.update_fn)(&new_props);
}