diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index 1eeea5e20..9b5e14f43 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -143,6 +143,7 @@ export const CoreFilterCmpt = { page: false, }, collapsedHeadingLocalizationTimer: null, + areTablePresetsShown: false, }; }, computed: { @@ -916,11 +917,14 @@ export const CoreFilterCmpt = { v-if="$props.isUsingPresets && $props.presetsId?.length" v-collapse-auto-close @tablePresetApplied="afterTablePresetApplied($event.preset)" + @[\`shown.bs.collapse\`]="areTablePresetsShown = true" + @[\`hide.bs.collapse\`]="areTablePresetsShown = false" :id="'tablePresets' + idExtra" :data-bs-parent="'#filterCollapsables' + idExtra" :presetsId="$props.presetsId" :tabulator="tabulator" :generalPresets="$props.generalPresets" + :isShown="areTablePresetsShown" class="card-body collapse" > diff --git a/public/js/components/filter/Filter/TablePresets.js b/public/js/components/filter/Filter/TablePresets.js index c764b9284..f8432d2db 100644 --- a/public/js/components/filter/Filter/TablePresets.js +++ b/public/js/components/filter/Filter/TablePresets.js @@ -26,6 +26,7 @@ export default { presetsId: { type: String }, tabulator: { type: Object }, generalPresets: { type: Array, default: [] }, + isShown: { type: Boolean, default: true } }, emits: ["applyTablePreset"], data: function () { @@ -141,6 +142,12 @@ export default { }, deep: true, }, + isShown() { + if (!this.$props.isShown) { + this.hidePresetInfo(); + this.hideNewPresetForm(); + } + }, }, methods: { async showPresetInfo(preset) { @@ -467,7 +474,7 @@ export default { -
+

@@ -481,7 +488,7 @@ export default {
-
+