Fix clearing of the repository filters [SCI-10115] (#7060)

This commit is contained in:
ajugo 2024-02-06 09:09:58 +01:00 committed by GitHub
parent 4cb55e06af
commit 80735c0a01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;