chg: [navbar:search-all] Fixed dropdown instantiation
parent
cf3e87614e
commit
24a8aa42c8
|
@ -4,10 +4,12 @@
|
|||
<input type="text" class="form-control d-inline-block" id="globalSearch" placeholder="<?= __('Search in Cerebrate...') ?>">
|
||||
<i class="icon <?= $this->FontAwesome->getClass('search') ?>"></i>
|
||||
</span>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="dropdown-toggle d-none" id="dropdownMenuSearchAll" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"></button>
|
||||
<div class="global-search-result-container dropdown-menu dropdown-menu-end p-0 pt-2" aria-labelledby="dropdownMenuSearchAll">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-menu d-flex ms-1">
|
||||
<?= $this->element('layouts/header/header-notifications') ?>
|
||||
<?= $this->element('layouts/header/header-profile') ?>
|
||||
|
|
|
@ -128,7 +128,7 @@ function performGlobalSearch(evt) {
|
|||
return;
|
||||
}
|
||||
if (value.length < 3 && evt.keyCode != 13) {
|
||||
bootstrap.Popover.getInstance('#dropdownMenuSearchAll').hide()
|
||||
bootstrap.Dropdown.getOrCreateInstance('#dropdownMenuSearchAll').hide()
|
||||
return;
|
||||
}
|
||||
const endpoint = '/instance/searchAll'
|
||||
|
@ -138,7 +138,7 @@ function performGlobalSearch(evt) {
|
|||
statusNode: $resultContainer
|
||||
}
|
||||
|
||||
bootstrap.Popover.getInstance('#dropdownMenuSearchAll').show()
|
||||
bootstrap.Dropdown.getOrCreateInstance('#dropdownMenuSearchAll').show()
|
||||
AJAXApi.quickFetchURL(url, options).then((theHTML) => {
|
||||
$resultContainer.html(theHTML)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue