Closed kaelsantini closed 5 months ago
I'm getting this error trying to instantiate this library.
import { Controller } from "@hotwired/stimulus" import * as bootstrap from 'bootstrap'; window.bootstrap = bootstrap; import { UseBootstrapSelect } from 'use-bootstrap-select' export default class extends Controller { connect() { this.element.setAttribute('data-ub-select-search', true); this.element.setAttribute('data-ub-select-search-placeholder', 'Digite para buscar...'); this.element.setAttribute('data-ub-select-no-results-text', 'Nenhum resultado encontrado.'); this.select = UseBootstrapSelect(this.element); } }
Without lines 2 and 3, I got the error:
What is the response of console.log(typeof bootstrap) from your browser console?
console.log(typeof bootstrap)
In v2, the library now works without bootstrap javascript.
I'm getting this error trying to instantiate this library.
Without lines 2 and 3, I got the error: