Please consider adding a minimum search length for use cases when there is a large number of options and now async calls are available to populate the list. For example I have a list of ~ 2700 employees that is used in conjunction with this combobox and it behaves quite slowly when only one character is entered.
Also, when the minimum length is not met the dropdown could be hidden if not shown due to clicking the caret span.
I have implemented this partially myself by adding cases for delete and backspace and changing the default case in the keyup function like so:
keyup: function (e) {
// other cases here
case 8: // backspace
if (this.$element.val().length < this.minSearchLength) {
this.hide();
break;
} else {
// fall through to default case.
}
case 46: // delete
if (this.$element.val().length < this.minSearchLength) {
this.hide();
break;
} else {
// fall through to default case.
}
default:
if (this.$element.val().length > this.minSearchLength-1) {
this.clearTarget();
this.lookup();
}
}
Please consider adding a minimum search length for use cases when there is a large number of options and now async calls are available to populate the list. For example I have a list of ~ 2700 employees that is used in conjunction with this combobox and it behaves quite slowly when only one character is entered. Also, when the minimum length is not met the dropdown could be hidden if not shown due to clicking the caret span.
I have implemented this partially myself by adding cases for delete and backspace and changing the default case in the keyup function like so: