From 3dab6a3d18a247edc26fa22789d0906d8a0f8d59 Mon Sep 17 00:00:00 2001 From: crschnick Date: Wed, 28 Aug 2024 23:41:33 +0000 Subject: [PATCH] Reset scroll --- .../java/io/xpipe/app/comp/store/StoreEntryListComp.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java index 41439a9ce..53b775696 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java @@ -28,6 +28,12 @@ public class StoreEntryListComp extends SimpleComp { return custom; }, true); + content.apply(struc -> { + // Reset scroll + StoreViewState.get().getActiveCategory().addListener((observable, oldValue, newValue) -> { + struc.get().setVvalue(0); + }); + }); return content.styleClass("store-list-comp"); }