mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
feat(editor): Add workflow filters to querystring (#7456)
fixes: https://linear.app/n8n/issue/ADO-1222/feature-save-filters-in-workflows
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
<div v-if="showFiltersDropdown" v-show="hasFilters" class="mt-xs">
|
||||
<n8n-info-tip :bold="false">
|
||||
{{ i18n.baseText(`${resourceKey}.filters.active`) }}
|
||||
<n8n-link @click="resetFilters" size="small">
|
||||
<n8n-link data-test-id="workflows-filter-reset" @click="resetFilters" size="small">
|
||||
{{ i18n.baseText(`${resourceKey}.filters.active.reset`) }}
|
||||
</n8n-link>
|
||||
</n8n-info-tip>
|
||||
@@ -392,6 +392,19 @@ export default defineComponent({
|
||||
this.loading = false;
|
||||
await this.$nextTick();
|
||||
this.focusSearchInput();
|
||||
|
||||
if (this.hasAppliedFilters()) {
|
||||
this.hasFilters = true;
|
||||
}
|
||||
},
|
||||
hasAppliedFilters(): boolean {
|
||||
return !!this.filterKeys.find(
|
||||
(key) =>
|
||||
key !== 'search' &&
|
||||
(Array.isArray(this.filters[key])
|
||||
? this.filters[key].length > 0
|
||||
: this.filters[key] !== ''),
|
||||
);
|
||||
},
|
||||
setCurrentPage(page: number) {
|
||||
this.currentPage = page;
|
||||
|
||||
Reference in New Issue
Block a user