Api: Clear sorting with 'No filters' favorite

This commit is contained in:
nathangray 2020-11-16 10:57:04 -07:00
parent 09c0d12f0e
commit 9bc4c41941
2 changed files with 9 additions and 0 deletions

View File

@ -280,6 +280,10 @@ var EgwApp = /** @class */ (function () {
if (state.state && state.state.sort && state.state.sort.id) { if (state.state && state.state.sort && state.state.sort.id) {
_widget.sortBy(state.state.sort.id, state.state.sort.asc, false); _widget.sortBy(state.state.sort.id, state.state.sort.asc, false);
} }
else {
// Not using resetSort() to avoid the extra applyFilters() call
_widget.sortBy(undefined, undefined, false);
}
if (state.state && state.state.selectcols) { if (state.state && state.state.selectcols) {
// Make sure it's a real array, not an object, then set cols // Make sure it's a real array, not an object, then set cols
_widget.set_columns(jQuery.extend([], state.state.selectcols)); _widget.set_columns(jQuery.extend([], state.state.selectcols));

View File

@ -400,6 +400,11 @@ export abstract class EgwApp
{ {
_widget.sortBy(state.state.sort.id, state.state.sort.asc,false); _widget.sortBy(state.state.sort.id, state.state.sort.asc,false);
} }
else
{
// Not using resetSort() to avoid the extra applyFilters() call
_widget.sortBy(undefined,undefined,false);
}
if(state.state && state.state.selectcols) if(state.state && state.state.selectcols)
{ {
// Make sure it's a real array, not an object, then set cols // Make sure it's a real array, not an object, then set cols