mirror of
https://github.com/portainer/portainer.git
synced 2025-11-26 14:06:05 +08:00
feat(UX): persist search criterias (#2425)
* feat(ui): persist search criteria * fix(ui): trying make templates search working correctly * fix(ui): corrected search persistance on home and templates * fix(ui): corrected javascript errors
This commit is contained in:
committed by
Anthony Lapenna
parent
1a94158f77
commit
2541f4daea
@@ -22,6 +22,10 @@ function (PaginationService, DatatableService) {
|
||||
}
|
||||
};
|
||||
|
||||
this.onTextFilterChange = function() {
|
||||
DatatableService.setDataTableTextFilters(this.tableKey, this.state.textFilter);
|
||||
};
|
||||
|
||||
this.changeOrderBy = function(orderField) {
|
||||
this.state.reverseOrder = this.state.orderBy === orderField ? !this.state.reverseOrder : false;
|
||||
this.state.orderBy = orderField;
|
||||
@@ -86,6 +90,11 @@ function (PaginationService, DatatableService) {
|
||||
this.filters = storedFilters;
|
||||
}
|
||||
this.filters.usage.open = false;
|
||||
|
||||
var textFilter = DatatableService.getDataTableTextFilters(this.tableKey);
|
||||
if (textFilter !== null) {
|
||||
this.state.textFilter = textFilter;
|
||||
}
|
||||
};
|
||||
|
||||
function setDefaults(ctrl) {
|
||||
|
||||
Reference in New Issue
Block a user