mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-22 15:39:08 +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_by', name: I18n.t('repositories.table.archived_by'), data_type: 'RepositoryUserValue' },
|
||||||
{ id: 'archived_on', name: I18n.t('repositories.table.archived_on'), data_type: 'RepositoryDateTimeValue' }
|
{ id: 'archived_on', name: I18n.t('repositories.table.archived_on'), data_type: 'RepositoryDateTimeValue' }
|
||||||
];
|
];
|
||||||
const defFilters = JSON.parse(JSON.stringify(DEFAULT_FILTERS));
|
|
||||||
const app = createApp({
|
const app = createApp({
|
||||||
data: () => ({
|
data: () => ({
|
||||||
filters: [],
|
filters: [],
|
||||||
|
@ -127,8 +126,8 @@ window.initRepositoryFilter = () => {
|
||||||
clearFilters() {
|
clearFilters() {
|
||||||
this.filters.forEach((filter, index) => {
|
this.filters.forEach((filter, index) => {
|
||||||
const newFilter = { ...filter };
|
const newFilter = { ...filter };
|
||||||
newFilter.data['parameters'] = {};
|
newFilter.data.parameters = {};
|
||||||
newFilter.data['operator'] = defFilters[index].data['operator'];
|
newFilter.data.operator = '';
|
||||||
return newFilter;
|
return newFilter;
|
||||||
});
|
});
|
||||||
this.filterName = null;
|
this.filterName = null;
|
||||||
|
|
Loading…
Reference in a new issue