I am trying to figure out how to get a Dropdown search widget to open when the page loads in a mobile app.
Can you help me?
Hi @Andrew Finkelstein ,
You can try the below javascript on Onready event:
setTimeout(function() {
var dd = document.getElementById('myDropdown');
if (!dd) return;
dd.focus && dd.focus();
try {
var ev = new KeyboardEvent('keydown', {key:'ArrowDown', keyCode:40, which:40, bubbles:true});
dd.dispatchEvent(ev);
} catch(e) {
try { dd.click && dd.click(); } catch(e2) {}
}
}, 150); // tweak delay if needed
Hope this helps.
Regards,
Manish Jawla
If you don't want to use javascript you can use the DropdownOpen client action from OutsystemsUI in the Initialized event of the Dropdown Search.