SearchMixin: Fix localSearch did not get search options

This commit is contained in:
nathan 2024-03-20 14:18:38 -06:00
parent 7e9b2f3687
commit 98ffd25d69

View File

@ -292,11 +292,10 @@ export const SearchMixin = <T extends Constructor<Et2InputWidgetInterface &
* Check if one of our [local] items matches the search * Check if one of our [local] items matches the search
* *
* @param search * @param search
* @param item
* @returns {boolean} * @returns {boolean}
* @protected * @protected
*/ */
public searchMatch<DataType extends SearchResult>(search : string, option : DataType) : boolean public searchMatch<DataType extends SearchResult>(search : string, searchOptions : Object, option : DataType) : boolean
{ {
if(!option || !option.value) if(!option || !option.value)
{ {
@ -341,7 +340,7 @@ export const SearchMixin = <T extends Constructor<Et2InputWidgetInterface &
{ {
return; return;
} }
if(this.searchMatch<DataType>(value, option)) if(this.searchMatch<DataType>(value, searchOptions, option))
{ {
local.results.push(option); local.results.push(option);
local.total++; local.total++;