mirror of
https://github.com/logos-co/open-law.git
synced 2025-01-10 14:55:50 +00:00
commit
4736cb5ee9
File diff suppressed because one or more lines are too long
@ -8,6 +8,7 @@ const searchDiv: HTMLElement = document.querySelector('#quickSearchModal');
|
|||||||
|
|
||||||
const modalOptions: ModalOptions = {
|
const modalOptions: ModalOptions = {
|
||||||
closable: true,
|
closable: true,
|
||||||
|
backdrop: 'static',
|
||||||
onHide: () => {},
|
onHide: () => {},
|
||||||
onShow: () => {},
|
onShow: () => {},
|
||||||
onToggle: () => {},
|
onToggle: () => {},
|
||||||
@ -18,9 +19,6 @@ const quickSearchModal: ModalInterface = new Modal(searchDiv, modalOptions);
|
|||||||
export function quickSearch() {
|
export function quickSearch() {
|
||||||
if (currentSearchInput && searchDiv) {
|
if (currentSearchInput && searchDiv) {
|
||||||
currentSearchInput.addEventListener('input', debounce(onInputChange, 500));
|
currentSearchInput.addEventListener('input', debounce(onInputChange, 500));
|
||||||
currentSearchInput.addEventListener('blur', () => {
|
|
||||||
quickSearchModal.hide();
|
|
||||||
});
|
|
||||||
currentSearchInput.addEventListener('keypress', async e => {
|
currentSearchInput.addEventListener('keypress', async e => {
|
||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
const urlParams = new URLSearchParams({
|
const urlParams = new URLSearchParams({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user