hide search on device dialog open

This commit is contained in:
Stewart Allen 2020-12-25 13:24:35 -05:00
commit 10e722c53d

View file

@ -1210,7 +1210,8 @@
} }
function showDevices() { function showDevices() {
updateDeviceList(); // disable device filter and show devices
UI.dev.search.onclick(true);
API.modal.show('setup'); API.modal.show('setup');
UI.deviceList.focus(); UI.deviceList.focus();
} }
@ -1869,9 +1870,9 @@
if (!ev.buttons) API.event.emit('slider.unlabel'); if (!ev.buttons) API.event.emit('slider.unlabel');
}; };
UI.dev.search.onclick = () => { UI.dev.search.onclick = (hide) => {
let style = UI.dev.filter.style; let style = UI.dev.filter.style;
if (style.display === 'flex') { if (style.display === 'flex' || hide === true) {
style.display = ''; style.display = '';
deviceFilter = null; deviceFilter = null;
updateDeviceList(); updateDeviceList();