Fixes access to undefined filterTypeOptions in text autocomplete scenario.
This commit is contained in:
parent
2ec978de23
commit
a90fbc813d
|
@ -9,7 +9,7 @@
|
|||
border: 0; }
|
||||
|
||||
/**
|
||||
* Swiper 11.1.1
|
||||
* Swiper 11.1.3
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: April 9, 2024
|
||||
* Released on: May 13, 2024
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'swiper-icons';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
border: 0; }
|
||||
|
||||
/**
|
||||
* Swiper 11.1.1
|
||||
* Swiper 11.1.3
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: April 9, 2024
|
||||
* Released on: May 13, 2024
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'swiper-icons';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
border: 0; }
|
||||
|
||||
/**
|
||||
* Swiper 11.1.1
|
||||
* Swiper 11.1.3
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: April 9, 2024
|
||||
* Released on: May 13, 2024
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'swiper-icons';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Swiper 11.1.1
|
||||
* Swiper 11.1.3
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: April 9, 2024
|
||||
* Released on: May 13, 2024
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'swiper-icons';
|
||||
|
|
|
@ -268,31 +268,30 @@ export const dynamicFilterTypeMixin = {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.shouldAddOptions === true && this.searchResults && this.searchResults.length)
|
||||
if ( this.shouldAddOptions === true && this.searchResults && this.searchResults.length )
|
||||
this.searchResults = this.searchResults.concat(sResults);
|
||||
else
|
||||
this.searchResults = sResults;
|
||||
|
||||
if (opts) {
|
||||
if ( opts ) {
|
||||
if (this.shouldAddOptions === true && this.options && this.options.length)
|
||||
this.options = this.options.concat(opts)
|
||||
else
|
||||
this.options = opts;
|
||||
}
|
||||
else if(!search)
|
||||
else if ( !search )
|
||||
this.noMorePage = 1;
|
||||
|
||||
if (this.options.length < this.maxNumOptionsCheckboxList && !search)
|
||||
if ( this.options.length < this.maxNumOptionsCheckboxList && !search )
|
||||
this.noMorePage = 1;
|
||||
|
||||
if ((this.filterTypeOptions.use_max_options == true && this.filter.max_options) && this.options.length >= this.filter.max_options) {
|
||||
if ( ( this.filterTypeOptions && this.filterTypeOptions.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){
|
||||
if ( this.options.length === this.filter.max_options )
|
||||
this.options[this.filter.max_options-1].showViewAllButton = showViewAllButton;
|
||||
} else {
|
||||
else
|
||||
this.options[this.options.length-1].showViewAllButton = showViewAllButton;
|
||||
}
|
||||
}
|
||||
},
|
||||
prepareOptionsForRelationship(items, search, valuesToIgnore, isInCheckboxModal) {
|
||||
|
@ -340,32 +339,31 @@ export const dynamicFilterTypeMixin = {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.shouldAddOptions === true && this.searchResults && this.searchResults.length)
|
||||
if ( this.shouldAddOptions === true && this.searchResults && this.searchResults.length )
|
||||
this.searchResults = this.searchResults.concat(sResults);
|
||||
else
|
||||
this.searchResults = sResults;
|
||||
|
||||
if (opts) {
|
||||
if ( opts ) {
|
||||
if (this.shouldAddOptions === true && this.options && this.options.length)
|
||||
this.options = this.options.concat(opts)
|
||||
else
|
||||
this.options = opts;
|
||||
}
|
||||
else if(!search)
|
||||
else if ( !search )
|
||||
this.noMorePage = 1;
|
||||
|
||||
|
||||
if (this.options.length < this.maxNumOptionsCheckboxList)
|
||||
if ( this.options.length < this.maxNumOptionsCheckboxList )
|
||||
this.noMorePage = 1;
|
||||
|
||||
if ((this.filterTypeOptions.use_max_options == true && this.filter.max_options) && this.options.length >= this.filter.max_options) {
|
||||
if ( ( this.filterTypeOptions && this.filterTypeOptions.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){
|
||||
if ( this.options.length === this.filter.max_options )
|
||||
this.options[this.filter.max_options-1].showViewAllButton = showViewAllButton;
|
||||
} else {
|
||||
else
|
||||
this.options[this.options.length-1].showViewAllButton = showViewAllButton;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue