This is a bit difficult, I need to make a searchable dropdown, without a plugin. I already have jquery.sumoselect -2.1.0 applied, but this version does not contain the search option. I can't change the design, therefore I can't remove the library or add another, and I need to search in the list of options I have:
<select class="sumoselect companyFilter" multiple>
<?php foreach ($companies as $company) { ?>
<option value="<?= $company->ID ?>"><?= $company->Nume ?></option>
<?php } ?>
</select>
$('.sumoselect').SumoSelect();
$('.companyFilter').on('click', function (){
console.log('droop');
});
This can be doable with just js? I was thinking to add a input for search in the list option, to enter there the text, but the output is crazy, doesn't do it. After I was thinking somehow, on dropdown to transform the select into a input...but I dont know how.
Finally, I was thinking I can verify that the input val matches the options that I have. But I can't make it over how to do with this input.