Closed drewzb closed 2 weeks ago
After poking around the source code, I found a workaround. Create a :slotRef that points to the template ref.
<GmvAutocomplete :slotRef="input ">
<template #default="slotProps">
<input ref="input" v-bind:attrs="slotProps.attrs" />
</template>
</GmvAutocomplete>
...
const input = ref(null)
Branch issue-328-Bug_Autocomplete_slot created!
After poking around the source code, I found a workaround. Create a :slotRef that points to the template ref.
<GmvAutocomplete :slotRef="input "> <template #default="slotProps"> <input ref="input" v-bind:attrs="slotProps.attrs" /> </template> </GmvAutocomplete> ... const input = ref(null)
@drewzb it is not a workaround; it is the expected way the template slot should be used. You can check it here, and here. I need to update the documentation about it, I was working a lot and couldn't finish it. Thank you for being so patient.
Describe the bug
When using a template slot in Autocomplete, there is an error that template ref 'gmvAutoCompleteInput' can't be found, or we can't use slotRef prop.
To reproduce
Expected behavior
I would expect the to be used.
Current behavior
I'm getting an error:
Screenshots
None
Desktop (please complete the following information)
Smartphone (please complete the following information)
N/A
Additional context
I've tried many other things such as changing the ref="input", remove it, adding slot-ref-name,...nothing seems to work.
Versions
Package manager
Plugin version
I'm using @gmap-vue/v3 - 2.1.2