Answer the question
In order to leave comments, you need to log in
How to expand select after function execution?
There is a select, the option of which is filled dynamically:
"
{{app.customerType == "company"?i.TITLE:i.LAST_NAME+" "+i.NAME}}
"
after the app.customerList has been formed, I run the function that should expand select:
let elem = document.getElementById('select-customer')
let event = document.createEvent('MouseEvents');
event.initMouseEvent('mousedown', true, true, window);
elem.dispatchEvent(event);
, but the event doesn't fire, the select remains "closed".
Answer the question
In order to leave comments, you need to log in
No way. Maximum change the size attribute
https://jsfiddle.net/yarkov_aleksei/51dwn2hc/
It is impossible to open the default select without clicking, only if you emit and open your own.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question