From e16aa31ddf3ecf1c1a608716452f7041a84c8e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Tue, 27 Feb 2024 23:05:24 +0100 Subject: [PATCH] Fixed z-index of autocomplete dropdown --- .../elements/part_livesearch_controller.js | 1 + .../css/components/autocomplete_bootstrap.css | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 assets/css/components/autocomplete_bootstrap.css diff --git a/assets/controllers/elements/part_livesearch_controller.js b/assets/controllers/elements/part_livesearch_controller.js index 2a78d860..693de5bd 100644 --- a/assets/controllers/elements/part_livesearch_controller.js +++ b/assets/controllers/elements/part_livesearch_controller.js @@ -20,6 +20,7 @@ import { Controller } from "@hotwired/stimulus"; import { autocomplete } from '@algolia/autocomplete-js'; import "@algolia/autocomplete-theme-classic/dist/theme.css"; +import "../../css/components/autocomplete_bootstrap.css"; import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches'; import {marked} from "marked"; diff --git a/assets/css/components/autocomplete_bootstrap.css b/assets/css/components/autocomplete_bootstrap.css new file mode 100644 index 00000000..fd06853e --- /dev/null +++ b/assets/css/components/autocomplete_bootstrap.css @@ -0,0 +1,27 @@ +/* + * This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony). + * + * Copyright (C) 2019 - 2024 Jan Böhmer (https://github.com/jbtronics) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +/*** + * Override some styles from the algolia autocomplete library to harmonize more with the bootstrap theme + */ + +/** Ensure that the autocomplete dropdown is always on top */ +.aa-Panel { + z-index: 1000; +}