mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 09:44:41 +02:00
Fixed bootstrap-selectpickers on bootstrap 5
This commit is contained in:
parent
5d6f244e71
commit
489f4b939a
5 changed files with 24 additions and 24 deletions
|
@ -1,6 +1,9 @@
|
|||
const bootstrap = window.bootstrap = require('bootstrap'); // without this bootstrap-select crashes with `undefined bootstrap`
|
||||
require('bootstrap-select/js/bootstrap-select'); // we have to manually require the working js file
|
||||
|
||||
import {Controller} from "@hotwired/stimulus";
|
||||
import "bootstrap-select";
|
||||
import 'bootstrap-select/dist/css/bootstrap-select.css'
|
||||
//import "bootstrap-select/js/bootstrap-select";
|
||||
import 'bootstrap-select/sass/bootstrap-select.scss';
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
|
|
|
@ -30,7 +30,8 @@ const RegisterEventHelper = class {
|
|||
registerTooltips() {
|
||||
this.registerLoadHandler(() => {
|
||||
$(".tooltip").remove();
|
||||
$('a[title], button[title], span[title], h6[title], h3[title], i.fas[title]')
|
||||
//Exclude dropdown buttons from tooltips, otherwise we run into endless errors from bootstrap (bootstrap.esm.js:614 Bootstrap doesn't allow more than one instance per element. Bound instance: bs.dropdown.)
|
||||
$('a[title], button[title]:not([data-bs-toggle="dropdown"]), span[title], h6[title], h3[title], i.fas[title]')
|
||||
//@ts-ignore
|
||||
.tooltip("hide").tooltip({container: "body", placement: "auto", boundary: 'window'});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue