mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed various problems with the quicksearch
This commit is contained in:
parent
04aeab7ea6
commit
e0ef376cf0
3 changed files with 5 additions and 3 deletions
|
@ -42,6 +42,7 @@ export default class extends Controller {
|
|||
|
||||
_autocomplete;
|
||||
|
||||
// Highlight the search query in the results
|
||||
_highlight = (text, query) => {
|
||||
if (!text) return text;
|
||||
if (!query) return text;
|
||||
|
@ -77,7 +78,7 @@ export default class extends Controller {
|
|||
this._autocomplete = autocomplete({
|
||||
container: this.element,
|
||||
//Place the panel in the navbar, if the element is in navbar mode
|
||||
panelContainer: navbar_mode ? document.getElementById("navbar-frame") : document.body,
|
||||
panelContainer: navbar_mode ? document.getElementById("navbar-search-form") : document.body,
|
||||
panelPlacement: this.element.dataset.panelPlacement,
|
||||
plugins: [recentSearchesPlugin],
|
||||
openOnFocus: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue