autocomplete
autocomplete copied to clipboard
Not v-model compatible
If I try to attach a model with v-model, [object InputEvent]
appears in the field element when typing.
Not being compatible with v-model makes it impractical to work with in a form.
The value has to be fed somehow in the model, so not having the v-model available forces to have an extra input in the form - hidden - so the value can be attached to a model.
But then again, having it hidden makes it difficult to validate.
Or maybe I have not just found the way
Totally agree. I'm planning on addressing this in v3, since it will require a pretty fundamental change to the internals of the component.
I'm open to help if you'd like. In my opinion yours is the most decent autocomplete code for Vue.js and I'd like to see it enhanced
Be safe
On Wed, 27 May 2020, 18:21 Trevor Eyre, [email protected] wrote:
Totally agree. I'm planning on addressing this in v3, since it will require a pretty fundamental change to the internals of the component.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trevoreyre/autocomplete/issues/85#issuecomment-634778075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGBAIRA4V274PRUIFKFELTRTU4XLANCNFSM4NJRTAUA .
That's very kind of you! I'd love some help if you're game. I'm currently working on v3 in the next branch, although I will warn you ahead of time, it's still pretty early and messy, and the approach is a fair bit different than the current implementation.
The general idea of the new approach is to split the autocomplete component into a group of smaller, composable components (as described in #33). This should make it easier to override different elements of the component, and have more direct control over how it functions, if you want.
In the next branch, I've started implementing this as web components in the main @trevoreyre/autocomplete
package, and these components would eventually replace the AutocompleteCore
class entirely. Then, for the different framework integrations like Vue and React, they should only have to provide a light wrapper around these web components. You can see an example in the new autocomplete-react
package in that branch.
If any of that sounds interesting to you, feel free to hit me up. I'd be happy to set up a chat sometime to go over it in more detail.
Any luck on a stable version of this? This really messes up reactive frameworks. It overrides listeners and wont work with other components. This is more for vanilla JS and not really useful for vuejs.
@timothymarois Not yet, I'm afraid. I haven't had a lot of time to work on this recently.