UX: Scroll to top of assigned list when switching users
This commit is contained in:
parent
8a77c932a7
commit
96c3d9d12e
|
@ -6,6 +6,15 @@ export default DiscourseRoute.extend({
|
||||||
ascending: { refreshModel: true }
|
ascending: { refreshModel: true }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
beforeModel(transition) {
|
||||||
|
if (!(transition.hasOwnProperty("from") && transition.from)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (transition.from.localName === "show") {
|
||||||
|
this.session.set("topicListScrollPosition", 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
model(params) {
|
model(params) {
|
||||||
let filter = null;
|
let filter = null;
|
||||||
if (params.filter !== "everyone") {
|
if (params.filter !== "everyone") {
|
||||||
|
|
Loading…
Reference in New Issue