diff --git a/web/eslint.config.ts b/web/eslint.config.ts index 933d4f94..1869046a 100644 --- a/web/eslint.config.ts +++ b/web/eslint.config.ts @@ -23,7 +23,6 @@ export default defineConfigWithVueTs( // Temporary ignores until rules can be fixed "vue/require-v-for-key": "off", "vue/valid-v-for": "off", - "vue/no-use-v-if-with-v-for": "off", }, }, skipFormatting, diff --git a/web/src/components/sidebars/LayerStyle.vue b/web/src/components/sidebars/LayerStyle.vue index 179a5e33..e3c86470 100644 --- a/web/src/components/sidebars/LayerStyle.vue +++ b/web/src/components/sidebars/LayerStyle.vue @@ -6,6 +6,7 @@ import type { Colormap, Layer, LayerStyle, + StyleFilter, StyleSpec, } from "@/types"; import { @@ -470,6 +471,11 @@ function removeFilter(filterId: number | undefined) { ); } +function findVectorProperty(filter: StyleFilter) { + if (!filter.filter_by || !vectorProperties.value) return undefined; + return vectorProperties.value.find((p) => p.name === filter.filter_by); +} + function updateFilterBy(filterId: number | undefined, propertyName: string) { if (!currentStyleSpec.value || !filterId || !vectorProperties.value) return; const property = vectorProperties.value.find((p) => p.name === propertyName); @@ -1930,81 +1936,73 @@ onMounted(resetCurrentStyle); v-if="focusedFilterId === filter.id" >
- -