mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Reset scroll and layout change
This commit is contained in:
parent
1fbf1ada20
commit
674577874e
1 changed files with 7 additions and 0 deletions
|
@ -2,6 +2,7 @@ package io.xpipe.app.comp.store;
|
|||
|
||||
import io.xpipe.app.comp.base.ListBoxViewComp;
|
||||
import io.xpipe.app.comp.base.MultiContentComp;
|
||||
import io.xpipe.app.core.AppLayoutModel;
|
||||
import io.xpipe.app.fxcomps.Comp;
|
||||
import io.xpipe.app.fxcomps.SimpleComp;
|
||||
|
||||
|
@ -34,6 +35,12 @@ public class StoreEntryListComp extends SimpleComp {
|
|||
struc.get().setVvalue(0);
|
||||
});
|
||||
});
|
||||
content.apply(struc -> {
|
||||
// Reset scroll
|
||||
AppLayoutModel.get().getSelected().addListener((observable, oldValue, newValue) -> {
|
||||
struc.get().setVvalue(0);
|
||||
});
|
||||
});
|
||||
return content.styleClass("store-list-comp");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue