filter
Optional. Sets a custom function for filtering Combo Box options
filter?: (item: object, target: string) => boolean;
Parameters:
The filter property is a custom function which takes two parameters:
item: object
- an item of data collectiontarget: string
- the string to compare to
and should return true/false to specify whether an item should be displayed in the filtered list of options.
Example
function mySearch(item, target) {
// your filtering logic here
}
const combo = new dhx.Combobox("combo_container", {
filter: mySearch
});
Related sample: Combobox. Custom filter