We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e0d18c6 + 08e32d2 commit b283b41Copy full SHA for b283b41
lib/vue-simple-suggest.vue
@@ -221,11 +221,17 @@ export default {
221
created () {
222
this.controlScheme = Object.assign({}, defaultControls, this.controls)
223
},
224
- mounted () {
+ async mounted () {
225
+ await this.$slots.default;
226
+
227
this.inputElement = this.$refs['inputSlot'].querySelector('input')
228
- this.setInputAriaAttributes()
- this.prepareEventHandlers(true)
229
+ if (this.inputElement) {
230
+ this.setInputAriaAttributes()
231
+ this.prepareEventHandlers(true)
232
+ } else {
233
+ console.error('No input element found')
234
+ }
235
236
beforeDestroy () {
237
this.prepareEventHandlers(false)
0 commit comments