Fixed error that algolia autocomplete input appeared multiple times after a link was clicked

This commit is contained in:
Jan Böhmer 2024-02-28 22:00:12 +01:00
parent 25a8642749
commit f70f6c39ce

View file

@ -30,7 +30,7 @@ export default class extends Controller {
_autocomplete;
connect() {
initialize() {
// The endpoint for searching parts
const base_url = this.element.dataset.autocomplete;
// The URL template for the part detail pages
@ -45,7 +45,7 @@ export default class extends Controller {
this._autocomplete = autocomplete({
container: this.element,
panelContainer: document.body,
panelContainer: document.getElementById("navbar-frame"),
panelPlacement: 'end',
plugins: [recentSearchesPlugin],
openOnFocus: true,