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.
1 parent e0d18c6 commit 9eb36caCopy full SHA for 9eb36ca
lib/vue-simple-suggest.vue
@@ -221,11 +221,18 @@ 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
231
+ this.setInputAriaAttributes()
232
+ this.prepareEventHandlers(true)
233
+ } else {
234
+ console.error('No input element found')
235
+ }
236
237
beforeDestroy () {
238
this.prepareEventHandlers(false)
0 commit comments