fix panel dropping issue about input drop-down box
This commit is contained in:
@ -363,18 +363,14 @@ class Dropdown {
|
||||
// const event = new InputEvent('type');
|
||||
// inputSearch.dispatchEvent(event);
|
||||
// }
|
||||
if (options.input) {
|
||||
this.#label.dispatchEvent(new InputEvent('type'));
|
||||
} else if (options.search) {
|
||||
if (!options.input && options.search) {
|
||||
const search = panel.querySelector('.dropdown-search > input');
|
||||
if (!nullOrEmpty(search?.value)) {
|
||||
search.dispatchEvent(new InputEvent('type'));
|
||||
} else {
|
||||
this.#filllist(this.source);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.#filllist(this.source);
|
||||
}
|
||||
this.#filllist(this.source);
|
||||
} else {
|
||||
panel.classList.remove('active');
|
||||
}
|
||||
@ -507,7 +503,7 @@ class Dropdown {
|
||||
sel.parentElement.replaceChild(drop.create(), sel);
|
||||
}
|
||||
return dom;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Dropdown;
|
Reference in New Issue
Block a user