|
|
@ -4,11 +4,9 @@ import 'accessible-autocomplete/dist/accessible-autocomplete.min.css' |
|
|
|
|
|
|
|
|
|
|
|
export default class extends Controller { |
|
|
|
export default class extends Controller { |
|
|
|
connect() { |
|
|
|
connect() { |
|
|
|
if(document.querySelectorAll(".autocomplete__input").length == 0){ |
|
|
|
accessibleAutocomplete.enhanceSelectElement({ |
|
|
|
accessibleAutocomplete.enhanceSelectElement({ |
|
|
|
defaultValue: '', |
|
|
|
defaultValue: '', |
|
|
|
selectElement: this.element.querySelector('input') |
|
|
|
selectElement: this.element |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|