diff --git a/src/lib-components/BlockRemoveSearchFilter.vue b/src/lib-components/BlockRemoveSearchFilter.vue
index 53edc1f1f..11fa06e2d 100644
--- a/src/lib-components/BlockRemoveSearchFilter.vue
+++ b/src/lib-components/BlockRemoveSearchFilter.vue
@@ -65,19 +65,28 @@ function closeBlockFilter() {
-
-
diff --git a/src/lib-components/DateFilter.vue b/src/lib-components/DateFilter.vue
index 214980599..2fa6e68a4 100644
--- a/src/lib-components/DateFilter.vue
+++ b/src/lib-components/DateFilter.vue
@@ -456,9 +456,11 @@ onMounted(() => {
.button-text {
display: inline-flex;
align-items: center;
+
svg {
margin-right: 8px;
}
+
:deep(path.svg__fill--accent-blue) {
fill: $medium-grey;
}
@@ -800,29 +802,36 @@ onMounted(() => {
//mobile drawer styles for datefilter
:deep(.mobile-drawer) {
+
// center datepicker within drawer
.dp__main {
margin: 0 auto;
+
.dp__menu {
border: none;
}
}
+
// styles for the drawer launch button
// these may be useful for filterdropdown as well
.mobile-button {
width: 166px;
padding: 6px;
border-radius: 4px;
+
&:active {
color: white;
background-color: $accent-blue;
- path.svg__fill--accent-blue {
- fill: white;
+
+ path.svg__fill--accent-blue {
+ fill: white;
}
}
+
&.is-expanded {
color: $accent-blue;
border: 2px solid $accent-blue;
+
path.svg__fill--accent-blue {
fill: $accent-blue;
}
diff --git a/src/lib-components/SearchGenericFilters.vue b/src/lib-components/SearchGenericFilters.vue
index a88d42058..abe7b40c6 100644
--- a/src/lib-components/SearchGenericFilters.vue
+++ b/src/lib-components/SearchGenericFilters.vue
@@ -114,8 +114,16 @@ function doUpdateQueryFilters(key: string) {
emit('update:queryFilters', queryFilterButtonDropDownStates.value)
emit('filters-selection-action')
}
+// Handler to update filters reactively
+function handleFilterUpdate(updatedFilters: QueryFilters) {
+ // Replace the entire object reactively
+ queryFilterButtonDropDownStates.value = { ...updatedFilters }
+ console.log('Updated Filters:', queryFilterButtonDropDownStates.value)
+ // Emit an event if necessary
+ // emit('update:queryFilters', queryFilterButtonDropDownStates.value);
+}
function doSearch() {
- console.log('doSearch function called to emit update:queryFilters and filters-selection-action events to the parent component')
+ console.log('doSearch function called to emit update:queryFilters and filters-selection-action events to the parent component', queryFilterButtonDropDownStates.value)
emit('update:queryFilters', queryFilterButtonDropDownStates.value)
emit('filters-selection-action')
}
@@ -169,10 +177,16 @@ onClickOutside(clickOutsideTarget,
-
+
diff --git a/src/lib-components/SectionRemoveSearchFilter.vue b/src/lib-components/SectionRemoveSearchFilter.vue
index 0159dd927..778e95c88 100644
--- a/src/lib-components/SectionRemoveSearchFilter.vue
+++ b/src/lib-components/SectionRemoveSearchFilter.vue
@@ -4,6 +4,7 @@
import { computed, ref, watch } from 'vue'
import type { PropType } from 'vue'
import BlockRemoveSearchFilter from '@/lib-components/BlockRemoveSearchFilter.vue'
+import { useTheme } from '@/composables/useTheme'
interface Item {
[key: string]: string[]
@@ -15,9 +16,10 @@ const { filters } = defineProps({
default: () => { },
},
})
-
const emit = defineEmits(['update:filters', 'remove-selected'])
+const theme = useTheme()
+
const filteredFilters = ref- ({})
watch(() => filters, (newFilters) => {
@@ -28,7 +30,8 @@ watch(() => filters, (newFilters) => {
const parsedFilters = computed(() => {
const result = Object.entries(filteredFilters.value).flatMap(([name, value]) => {
- return value.map(item => ({ name, value: item }))
+ const items = Array.isArray(value) ? value : []
+ return items.map(item => ({ name, value: item }))
})
return result
})
@@ -53,6 +56,7 @@ function closeBlockFilter(esfieldName: string, label: string | boolean) {
:key="`filter-${filter.value}`"
>
'ftva'),
+ }
+ },
+ components: { SectionRemoveSearchFilter },
+ template: `
+
+ `,
+ }
+}