django-autocomplete-light
django-autocomplete-light copied to clipboard
Can't open and setfocus on component on document.ready
I need to open and set the focus on my autocomplete on page load (document.ready). I used to do something like:
$(document).ready(function () {
$('#select2_field').select2('open')
});
Due to Autocomplete-light initializing the component on document.ready too, it throws the error:
The select2('open') method was called on an element that is not using Select.
The question is: how can I open and focus the autocomplete on document.ready, after autocomplete-light full initialization?
Excellent question, I believe we offer no way as of now. Do you want to open a PR that emits an event after initialization? Would that help?
Hello, if you can guide me in the process, I would like to open the PR.
Hi, I've added the event notifying after the initialization and created a pull request.
Hi, I've opened the PR, how much time does it takes to be merged? There is anything more I can do?