When using Materialize.css autocomplete, I am trying to make the list open upon focusing the textbox without entering any characters. I attempted to achieve this by setting {minLength: 0}:
$('#dataset_input').autocomplete({data: res, limit: 20, minLength: 0})
However, it appears that this approach is not effective.
I believe the issue lies in the validation check for the value (taken from GitHub):
if (data.hasOwnProperty(key) &&
key.toLowerCase().indexOf(val) !== -1 &&
key.toLowerCase() !== val) {
// Break if past limit
if (count >= options.limit) {
break;
}
In this case, the value (val) has a length of 0. Is there an alternative solution to achieve the desired behavior?