Add refresh button

This commit is contained in:
2025-12-28 22:18:06 +01:00
parent 3656db7e98
commit ac82875a3d
3 changed files with 68 additions and 38 deletions
+16
View File
@@ -83,8 +83,22 @@ component GoodButtons inherits ScrollView {
}
}
component RefreshButton inherits HorizontalLayout {
alignment: center;
Button {
text: "Refresh";
width: 40%;
clicked() => {
State.refresh-list();
}
}
}
component AddView inherits VerticalBox {
in property <[SItem]> list;
RefreshButton {}
goods := GoodsList {
items <=> list;
}
@@ -112,6 +126,8 @@ component AddView inherits VerticalBox {
component ShopView inherits VerticalBox {
in property <[SItem]> list;
RefreshButton {}
goods := GoodsList {
items <=> list;
}
+1
View File
@@ -9,6 +9,7 @@ export global State {
{ name: "Test 2", checked: false },
{ name: "Test 3", checked: false },
];
callback refresh-list();
callback add-to-list(string);
callback check-item(string);
callback delete-checked();