From e9bee78d0ffd55cd9ddf0b37e0bd437c5c5c7562 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Tue, 4 Jun 2024 13:59:58 -0300 Subject: [PATCH] Checks valid filter_type_object.use_max_option instead of filter_type_options. --- .../filter-types/date/TainacanFilterDate.vue | 15 --------------- src/views/admin/js/filter-types-mixin.js | 6 +++--- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/views/admin/components/filter-types/date/TainacanFilterDate.vue b/src/views/admin/components/filter-types/date/TainacanFilterDate.vue index 5c6e30649..c2e8aaa1f 100644 --- a/src/views/admin/components/filter-types/date/TainacanFilterDate.vue +++ b/src/views/admin/components/filter-types/date/TainacanFilterDate.vue @@ -60,16 +60,6 @@ ≤  {{ $i18n.get('before_or_on_day') }} - - diff --git a/src/views/admin/js/filter-types-mixin.js b/src/views/admin/js/filter-types-mixin.js index c01f95675..c6f2920e5 100644 --- a/src/views/admin/js/filter-types-mixin.js +++ b/src/views/admin/js/filter-types-mixin.js @@ -284,8 +284,8 @@ export const dynamicFilterTypeMixin = { if ( this.options.length < this.maxNumOptionsCheckboxList && !search ) this.noMorePage = 1; - - if ( ( this.filterTypeOptions && this.filterTypeOptions.use_max_options == true && this.filter.max_options ) && this.options.length >= this.filter.max_options ) { + + if ( ( this.filter.filter_type_object && this.filter.filter_type_object.use_max_options == true && this.filter.max_options ) && this.options.length >= this.filter.max_options ) { let showViewAllButton = true; if ( this.options.length === this.filter.max_options ) @@ -357,7 +357,7 @@ export const dynamicFilterTypeMixin = { if ( this.options.length < this.maxNumOptionsCheckboxList ) this.noMorePage = 1; - if ( ( this.filterTypeOptions && this.filterTypeOptions.use_max_options == true && this.filter.max_options ) && this.options.length >= this.filter.max_options ) { + if ( ( this.filter.filter_type_object && this.filter.filter_type_object.use_max_options == true && this.filter.max_options ) && this.options.length >= this.filter.max_options ) { let showViewAllButton = true; if ( this.options.length === this.filter.max_options )