mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 08:06:17 +00:00
refactor: rearrange filters
This commit is contained in:
@@ -91,7 +91,7 @@ useMenuCloseOnEsc(open)
|
||||
|
||||
const draftFilter = ref({})
|
||||
const queryFilterOpen = ref(false)
|
||||
const viewFilterOpen = ref(false)
|
||||
const viewFilterOpen = ref(true)
|
||||
|
||||
const smartsheetEventListener = async (event: string, payload?: any) => {
|
||||
if (validateViewConfigOverrideEvent(event, ViewSettingOverrideOptions.FILTER_CONDITION, payload) && activeView?.value?.id) {
|
||||
@@ -265,22 +265,8 @@ watch(
|
||||
</SmartsheetToolbarColumnFilter>
|
||||
</template>
|
||||
<template v-else>
|
||||
<SmartsheetToolbarColumnFilter
|
||||
ref="filterComp"
|
||||
v-model="localFilters"
|
||||
v-model:draft-filter="draftFilter"
|
||||
v-model:is-open="open"
|
||||
class="nc-table-toolbar-menu"
|
||||
:auto-save="false"
|
||||
data-testid="nc-filter-menu"
|
||||
:is-view-filter="false"
|
||||
:allow-locked-local-edit="true"
|
||||
:disable-auto-load="true"
|
||||
>
|
||||
</SmartsheetToolbarColumnFilter>
|
||||
<template v-if="!!filtersLength">
|
||||
<a-divider class="!my-1" />
|
||||
<div class="px-2 pb-2">
|
||||
<div class="px-2 mt-2">
|
||||
<div
|
||||
class="leading-5 font-semibold inline-flex w-full items-center cursor-pointer px-2"
|
||||
:class="{ 'pb-0': !viewFilterOpen }"
|
||||
@@ -304,23 +290,37 @@ watch(
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="overflow-hidden transition-all duration-300 mt-1"
|
||||
class="overflow-hidden transition-all duration-300 -mt-2"
|
||||
:class="{ 'max-h-0': !viewFilterOpen, 'max-h-[1000px] overflow-auto': viewFilterOpen }"
|
||||
>
|
||||
<SmartsheetToolbarColumnFilter
|
||||
:key="`existing-${filterKey}`"
|
||||
v-model:is-open="open"
|
||||
class="nc-table-toolbar-menu !pl-2 !w-full"
|
||||
:model-value="existingFilters"
|
||||
:auto-save="false"
|
||||
:is-view-filter="true"
|
||||
class="p-1"
|
||||
read-only
|
||||
@update:filters-length="filtersLength = $event || 0"
|
||||
>
|
||||
</SmartsheetToolbarColumnFilter>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider class="!my-1" />
|
||||
</template>
|
||||
<SmartsheetToolbarColumnFilter
|
||||
ref="filterComp"
|
||||
v-model="localFilters"
|
||||
v-model:draft-filter="draftFilter"
|
||||
v-model:is-open="open"
|
||||
class="nc-table-toolbar-menu"
|
||||
:auto-save="false"
|
||||
data-testid="nc-filter-menu"
|
||||
:is-view-filter="false"
|
||||
:allow-locked-local-edit="true"
|
||||
:disable-auto-load="true"
|
||||
>
|
||||
</SmartsheetToolbarColumnFilter>
|
||||
</template>
|
||||
<template v-if="filtersFromUrlParams">
|
||||
<a-divider class="!my-1" />
|
||||
|
||||
@@ -2249,7 +2249,7 @@
|
||||
"webhookV2DeprecationAlertTitle": "Webhooks v3 Now Available",
|
||||
"webhookV2DeprecationAlertDesc": "Support for v2 webhooks will be deprecated shortly. Please review and upgrade your existing v2 webhooks to take advantage of the latest features.",
|
||||
"urlFilter": "URL filters are applied from URL parameters and combine with view filters set via the toolbar.",
|
||||
"viewFilter": "View filters are predefined filters set via the toolbar by creator/owner of the base.",
|
||||
"viewFilter": "View filters set by creator/owner of the base",
|
||||
"urlFilterError": "Invalid URL filter. Ignored as it could not be applied.",
|
||||
"dropYourDocHere": "Drop your document here",
|
||||
"airtableImportSuccess": "Successfully imported from Airtable Base.",
|
||||
|
||||
Reference in New Issue
Block a user