mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Fix clearing of the repository filters [SCI-10115] (#7060)
This commit is contained in:
parent
4cb55e06af
commit
80735c0a01
1 changed files with 2 additions and 3 deletions
|
@ -68,7 +68,6 @@ window.initRepositoryFilter = () => {
|
|||
{ id: 'archived_by', name: I18n.t('repositories.table.archived_by'), data_type: 'RepositoryUserValue' },
|
||||
{ id: 'archived_on', name: I18n.t('repositories.table.archived_on'), data_type: 'RepositoryDateTimeValue' }
|
||||
];
|
||||
const defFilters = JSON.parse(JSON.stringify(DEFAULT_FILTERS));
|
||||
const app = createApp({
|
||||
data: () => ({
|
||||
filters: [],
|
||||
|
@ -127,8 +126,8 @@ window.initRepositoryFilter = () => {
|
|||
clearFilters() {
|
||||
this.filters.forEach((filter, index) => {
|
||||
const newFilter = { ...filter };
|
||||
newFilter.data['parameters'] = {};
|
||||
newFilter.data['operator'] = defFilters[index].data['operator'];
|
||||
newFilter.data.parameters = {};
|
||||
newFilter.data.operator = '';
|
||||
return newFilter;
|
||||
});
|
||||
this.filterName = null;
|
||||
|
|
Loading…
Reference in a new issue