This commit is contained in:
Kostiantyn Stoliarskyi 2023-05-25 17:55:09 +03:00
parent c124af9dc9
commit 09e269735d
2 changed files with 2 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -8,6 +8,7 @@ const searchDiv: HTMLElement = document.querySelector('#quickSearchModal');
const modalOptions: ModalOptions = {
closable: true,
backdrop: 'static',
onHide: () => {},
onShow: () => {},
onToggle: () => {},
@ -18,9 +19,6 @@ const quickSearchModal: ModalInterface = new Modal(searchDiv, modalOptions);
export function quickSearch() {
if (currentSearchInput && searchDiv) {
currentSearchInput.addEventListener('input', debounce(onInputChange, 500));
currentSearchInput.addEventListener('blur', () => {
quickSearchModal.hide();
});
currentSearchInput.addEventListener('keypress', async e => {
if (e.key === 'Enter') {
const urlParams = new URLSearchParams({