Split widget callbacks into update and commit so only the latter adds a history state (#1584)

* feat: split commit and update layout

* feat: add on_commit callback

* Code review

* fix: refactor

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
zhiyuan
2024-02-05 01:32:15 -08:00
committed by GitHub
co-authored by Keavon Chambers
parent f25038067e
commit 9530e55ace
13 changed files with 497 additions and 195 deletions
+6 -1
View File
@@ -15,7 +15,12 @@ pub enum LayoutMessage {
layout: Layout,
layout_target: LayoutTarget,
},
UpdateLayout {
WidgetValueCommit {
layout_target: LayoutTarget,
widget_id: WidgetId,
value: serde_json::Value,
},
WidgetValueUpdate {
layout_target: LayoutTarget,
widget_id: WidgetId,
value: serde_json::Value,