autocomplete
autocomplete copied to clipboard
Vue3 Support
Packages doesn't seems run with Vue3, will you update it?
Do you have some examples of the errors you're seeing in Vue 3? I haven't tried it in v3 yet.
Just a random example of errors:
runtime-core.esm-bundler.js:159 [Vue warn]: `beforeDestroy` has been renamed to `beforeUnmount`.
at <Autocomplete search=fn<bound search> >
at <SearchInput>
warn @ runtime-core.esm-bundler.js:159
applyOptions @ runtime-core.esm-bundler.js:5960
finishComponentSetup @ runtime-core.esm-bundler.js:6606
setupStatefulComponent @ runtime-core.esm-bundler.js:6539
setupComponent @ runtime-core.esm-bundler.js:6479
mountComponent @ runtime-core.esm-bundler.js:4219
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
mountChildren @ runtime-core.esm-bundler.js:3995
mountElement @ runtime-core.esm-bundler.js:3918
processElement @ runtime-core.esm-bundler.js:3899
patch @ runtime-core.esm-bundler.js:3819
componentEffect @ runtime-core.esm-bundler.js:4312
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
render @ runtime-core.esm-bundler.js:4895
mount @ runtime-core.esm-bundler.js:3135
app.mount @ runtime-dom.esm-bundler.js:1431
eval @ main.ts:41
eval @ main.ts:40
eval @ main.ts:34
./src/main.ts @ vC.umd.js:1815
__webpack_require__ @ vC.umd.js:30
eval @ entry-lib-no-default.js:3
./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js @ vC.umd.js:202
__webpack_require__ @ vC.umd.js:30
(anonymous) @ vC.umd.js:94
(anonymous) @ vC.umd.js:97
webpackUniversalModuleDefinition @ vC.umd.js:9
(anonymous) @ vC.umd.js:10
Show 4 more frames
runtime-core.esm-bundler.js:159 [Vue warn]: Property "$createElement" was accessed during render but is not defined on instance.
at <Autocomplete search=fn<bound search> >
at <SearchInput>
warn @ runtime-core.esm-bundler.js:159
get @ runtime-core.esm-bundler.js:6244
__vue_render__ @ autocomplete.esm.js:632
renderComponentRoot @ runtime-core.esm-bundler.js:828
componentEffect @ runtime-core.esm-bundler.js:4294
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
mountChildren @ runtime-core.esm-bundler.js:3995
mountElement @ runtime-core.esm-bundler.js:3918
processElement @ runtime-core.esm-bundler.js:3899
patch @ runtime-core.esm-bundler.js:3819
componentEffect @ runtime-core.esm-bundler.js:4312
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
render @ runtime-core.esm-bundler.js:4895
mount @ runtime-core.esm-bundler.js:3135
app.mount @ runtime-dom.esm-bundler.js:1431
eval @ main.ts:41
eval @ main.ts:40
eval @ main.ts:34
./src/main.ts @ vC.umd.js:1815
__webpack_require__ @ vC.umd.js:30
eval @ entry-lib-no-default.js:3
./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js @ vC.umd.js:202
__webpack_require__ @ vC.umd.js:30
(anonymous) @ vC.umd.js:94
(anonymous) @ vC.umd.js:97
webpackUniversalModuleDefinition @ vC.umd.js:9
(anonymous) @ vC.umd.js:10
Show 7 more frames
runtime-core.esm-bundler.js:159 [Vue warn]: Property "_self" was accessed during render but is not defined on instance.
at <Autocomplete search=fn<bound search> >
at <SearchInput>
warn @ runtime-core.esm-bundler.js:159
get @ runtime-core.esm-bundler.js:6244
__vue_render__ @ autocomplete.esm.js:632
renderComponentRoot @ runtime-core.esm-bundler.js:828
componentEffect @ runtime-core.esm-bundler.js:4294
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
mountChildren @ runtime-core.esm-bundler.js:3995
mountElement @ runtime-core.esm-bundler.js:3918
processElement @ runtime-core.esm-bundler.js:3899
patch @ runtime-core.esm-bundler.js:3819
componentEffect @ runtime-core.esm-bundler.js:4312
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
render @ runtime-core.esm-bundler.js:4895
mount @ runtime-core.esm-bundler.js:3135
app.mount @ runtime-dom.esm-bundler.js:1431
eval @ main.ts:41
eval @ main.ts:40
eval @ main.ts:34
./src/main.ts @ vC.umd.js:1815
__webpack_require__ @ vC.umd.js:30
eval @ entry-lib-no-default.js:3
./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js @ vC.umd.js:202
__webpack_require__ @ vC.umd.js:30
(anonymous) @ vC.umd.js:94
(anonymous) @ vC.umd.js:97
webpackUniversalModuleDefinition @ vC.umd.js:9
(anonymous) @ vC.umd.js:10
Show 7 more frames
runtime-core.esm-bundler.js:159 [Vue warn]: Unhandled error during execution of render function
at <Autocomplete search=fn<bound search> >
at <SearchInput>
warn @ runtime-core.esm-bundler.js:159
logError @ runtime-core.esm-bundler.js:332
handleError @ runtime-core.esm-bundler.js:324
renderComponentRoot @ runtime-core.esm-bundler.js:937
componentEffect @ runtime-core.esm-bundler.js:4294
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
mountChildren @ runtime-core.esm-bundler.js:3995
mountElement @ runtime-core.esm-bundler.js:3918
processElement @ runtime-core.esm-bundler.js:3899
patch @ runtime-core.esm-bundler.js:3819
componentEffect @ runtime-core.esm-bundler.js:4312
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
render @ runtime-core.esm-bundler.js:4895
mount @ runtime-core.esm-bundler.js:3135
app.mount @ runtime-dom.esm-bundler.js:1431
eval @ main.ts:41
eval @ main.ts:40
eval @ main.ts:34
./src/main.ts @ vC.umd.js:1815
__webpack_require__ @ vC.umd.js:30
eval @ entry-lib-no-default.js:3
./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js @ vC.umd.js:202
__webpack_require__ @ vC.umd.js:30
(anonymous) @ vC.umd.js:94
(anonymous) @ vC.umd.js:97
webpackUniversalModuleDefinition @ vC.umd.js:9
(anonymous) @ vC.umd.js:10
Show 7 more frames
runtime-core.esm-bundler.js:338 Uncaught TypeError: Cannot read property '_c' of undefined
at Proxy.__vue_render__ (autocomplete.esm.js:632)
at renderComponentRoot (runtime-core.esm-bundler.js:828)
at componentEffect (runtime-core.esm-bundler.js:4294)
at reactiveEffect (reactivity.esm-bundler.js:71)
at effect (reactivity.esm-bundler.js:46)
at setupRenderEffect (runtime-core.esm-bundler.js:4277)
at mountComponent (runtime-core.esm-bundler.js:4235)
at processComponent (runtime-core.esm-bundler.js:4195)
at patch (runtime-core.esm-bundler.js:3822)
at mountChildren (runtime-core.esm-bundler.js:3995)
__vue_render__ @ autocomplete.esm.js:632
renderComponentRoot @ runtime-core.esm-bundler.js:828
componentEffect @ runtime-core.esm-bundler.js:4294
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
mountChildren @ runtime-core.esm-bundler.js:3995
mountElement @ runtime-core.esm-bundler.js:3918
processElement @ runtime-core.esm-bundler.js:3899
patch @ runtime-core.esm-bundler.js:3819
componentEffect @ runtime-core.esm-bundler.js:4312
reactiveEffect @ reactivity.esm-bundler.js:71
effect @ reactivity.esm-bundler.js:46
setupRenderEffect @ runtime-core.esm-bundler.js:4277
mountComponent @ runtime-core.esm-bundler.js:4235
processComponent @ runtime-core.esm-bundler.js:4195
patch @ runtime-core.esm-bundler.js:3822
render @ runtime-core.esm-bundler.js:4895
mount @ runtime-core.esm-bundler.js:3135
app.mount @ runtime-dom.esm-bundler.js:1431
eval @ main.ts:41
eval @ main.ts:40
eval @ main.ts:34
./src/main.ts @ vC.umd.js:1815
__webpack_require__ @ vC.umd.js:30
eval @ entry-lib-no-default.js:3
./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js @ vC.umd.js:202
__webpack_require__ @ vC.umd.js:30
(anonymous) @ vC.umd.js:94
(anonymous) @ vC.umd.js:97
webpackUniversalModuleDefinition @ vC.umd.js:9
(anonymous) @ vC.umd.js:10
Show 5 more frames
Some of those are breaking changes. Any plans to migrate to Vue3?
any news ?
@trevoreyre any luck for this?
Hi there! I think I'm also having vue3 issues.
I tried using autocomplete within a vue3 component like this:
<script lang="ts">
import { defineComponent } from 'vue'
import Autocomplete from '@trevoreyre/autocomplete-vue'
export default defineComponent({
components: {
Autocomplete,
},
methods: {
search(input: string) {
const countries = ['Germany', 'United States of America', 'Sweden']
if (input.length < 1) {
return []
}
return countries.filter((country) => {
return country.toLowerCase().startsWith(input.toLowerCase())
})
},
},
})
</script>
<template>
<autocomplete
:search="search"
placeholder="Search for a country"
aria-label="Search for a country"
/>
</template>
I can't get it to work. Some errors I see:
[Vue warn]: Property "$createElement" was accessed during render but is not defined on instance.
at <Autocomplete search=fn<bound search> placeholder="Search for a country" aria-label="Search for a country" >
at <Search>
at <App> [runtime-core.esm-bundler.js:38:16](http://127.0.0.1:5173/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js)
[Vue warn]: Property "_self" was accessed during render but is not defined on instance.
at <Autocomplete search=fn<bound search> placeholder="Search for a country" aria-label="Search for a country" >
at <Search>
at <App> [runtime-core.esm-bundler.js:38:16](http://127.0.0.1:5173/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js)
[Vue warn]: Unhandled error during execution of render function
at <Autocomplete search=fn<bound search> placeholder="Search for a country" aria-label="Search for a country" >
at <Search>
at <App>
Any thoughts?
Thanks!!
Hi there! I think I'm also having vue3 issues.
I tried using autocomplete within a vue3 component like this:
<script lang="ts"> import { defineComponent } from 'vue' import Autocomplete from '@trevoreyre/autocomplete-vue' export default defineComponent({ components: { Autocomplete, }, methods: { search(input: string) { const countries = ['Germany', 'United States of America', 'Sweden'] if (input.length < 1) { return [] } return countries.filter((country) => { return country.toLowerCase().startsWith(input.toLowerCase()) }) }, }, }) </script> <template> <autocomplete :search="search" placeholder="Search for a country" aria-label="Search for a country" /> </template>
I can't get it to work. Some errors I see:
[Vue warn]: Property "$createElement" was accessed during render but is not defined on instance. at <Autocomplete search=fn<bound search> placeholder="Search for a country" aria-label="Search for a country" > at <Search> at <App> [runtime-core.esm-bundler.js:38:16](http://127.0.0.1:5173/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js) [Vue warn]: Property "_self" was accessed during render but is not defined on instance. at <Autocomplete search=fn<bound search> placeholder="Search for a country" aria-label="Search for a country" > at <Search> at <App> [runtime-core.esm-bundler.js:38:16](http://127.0.0.1:5173/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js) [Vue warn]: Unhandled error during execution of render function at <Autocomplete search=fn<bound search> placeholder="Search for a country" aria-label="Search for a country" > at <Search> at <App>
Any thoughts?
Thanks!!
@dustinmichels many things has been changed for Vue3 core apis and this package not compatible
Any updates?
bump
currently working on it.
please update @trevoreyre/autocomplete-vue
to at least 3.0.1 for Vue 3 support.