mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-07 03:22:21 +03:00
Refined members list loading with filtering feature
no refs - resets filter columns on list when query params are removed from the url via sidebar click transition - reloads the updated list on new bulk actions on the filtered list
This commit is contained in:
parent
b678d345e3
commit
d3ab0a27eb
@ -485,7 +485,7 @@ export default class MembersController extends Controller {
|
|||||||
|
|
||||||
// reset and reload
|
// reset and reload
|
||||||
this.store.unloadAll('member');
|
this.store.unloadAll('member');
|
||||||
this.reset();
|
this.reload();
|
||||||
|
|
||||||
this.membersStats.invalidate();
|
this.membersStats.invalidate();
|
||||||
this.membersStats.fetchCounts();
|
this.membersStats.fetchCounts();
|
||||||
@ -510,9 +510,7 @@ export default class MembersController extends Controller {
|
|||||||
|
|
||||||
// reset and reload
|
// reset and reload
|
||||||
this.store.unloadAll('member');
|
this.store.unloadAll('member');
|
||||||
this.reset();
|
this.reload();
|
||||||
this.membersStats.invalidate();
|
|
||||||
this.membersStats.fetchCounts();
|
|
||||||
|
|
||||||
return response?.bulk?.meta;
|
return response?.bulk?.meta;
|
||||||
}
|
}
|
||||||
@ -534,9 +532,7 @@ export default class MembersController extends Controller {
|
|||||||
|
|
||||||
// reset and reload
|
// reset and reload
|
||||||
this.store.unloadAll('member');
|
this.store.unloadAll('member');
|
||||||
this.reset();
|
this.reload();
|
||||||
this.membersStats.invalidate();
|
|
||||||
this.membersStats.fetchCounts();
|
|
||||||
|
|
||||||
return response?.bulk?.meta;
|
return response?.bulk?.meta;
|
||||||
}
|
}
|
||||||
@ -546,9 +542,12 @@ export default class MembersController extends Controller {
|
|||||||
this.searchText = '';
|
this.searchText = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
resetFilters(params) {
|
||||||
this.filterParam = null;
|
if (!params?.filterParam) {
|
||||||
|
this.filters = A([]);
|
||||||
this.softFilterParam = null;
|
this.softFilterParam = null;
|
||||||
|
this.softFilters = A([]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
reload(params) {
|
reload(params) {
|
||||||
|
@ -24,6 +24,7 @@ export default class MembersRoute extends AuthenticatedRoute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model(params) {
|
model(params) {
|
||||||
|
this.controllerFor('members').resetFilters(params);
|
||||||
return this.controllerFor('members').fetchMembersTask.perform(params);
|
return this.controllerFor('members').fetchMembersTask.perform(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,10 +47,4 @@ export default class MembersRoute extends AuthenticatedRoute {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resetController(controller, isExiting) {
|
|
||||||
if (isExiting) {
|
|
||||||
controller.reset();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user