mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Remove search terms on datatable refresh [SCI-8574] (#5533)
This commit is contained in:
parent
015c481a2b
commit
31fdaf5e55
4 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/* global I18n DataTableHelpers HelperModule */
|
||||
/* eslint-disable no-use-before-define */
|
||||
/* eslint-disable no-use-before-define no-param-reassign */
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
@ -282,6 +282,9 @@
|
|||
initRefreshFluicsButton();
|
||||
window.initActionToolbar();
|
||||
window.actionToolbarComponent.setBottomOffset(68);
|
||||
},
|
||||
stateLoadParams: function(_, state) {
|
||||
state.search.search = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -269,6 +269,9 @@ var ProtocolsIndex = (function() {
|
|||
initProtocolsFilters();
|
||||
initRowSelection();
|
||||
},
|
||||
stateLoadParams: function(_, state) {
|
||||
state.search.search = '';
|
||||
},
|
||||
stateLoadCallback: function() {
|
||||
// Load the table state for the current team
|
||||
var state = localStorage.getItem(`datatables_protocols_state/${protocolsTableEl.data('team-id')}/${repositoryType}`);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* global I18n DataTableHelpers DataTableCheckboxes animateSpinner HelperModule Promise */
|
||||
/* eslint-disable no-param-reassign */
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
@ -238,6 +239,9 @@
|
|||
},
|
||||
rowCallback: function(row) {
|
||||
if (CHECKBOX_SELECTOR) CHECKBOX_SELECTOR.checkRowStatus(row);
|
||||
},
|
||||
stateLoadParams: function(_, state) {
|
||||
state.search.search = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* global I18n animateSpinner HelperModule
|
||||
DataTableHelpers DataTableCheckboxes notTurbolinksPreview */
|
||||
/* eslint-disable no-param-reassign */
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
|
@ -140,6 +141,9 @@
|
|||
}
|
||||
|
||||
if (CHECKBOX_SELECTOR) CHECKBOX_SELECTOR.checkRowStatus(row);
|
||||
},
|
||||
stateLoadParams: function(_, state) {
|
||||
state.search.search = '';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue