Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VUE Autocomplete return instead of JSX from a VUE Component #1193

Open
antoniszaravelas opened this issue Sep 25, 2023 · 1 comment
Open

Comments

@antoniszaravelas
Copy link

Hello everybody,

I wanted to ask, if Algolia has already or if there is a plan of a future implementation , where the return statement of the template of autocomplete is instead of a JSX or HTML a VUE component, where we can pass the necessary props that we need so we avoid big block of code like this :

return ( <div className="aa-ItemWrapper"> <div className="aa-ItemContent"> <div className="aa-ItemIcon"> <img src={item.image} alt={item.name} width="40" height="40" /> </div> <div className="aa-ItemContentBody"> <div className="aa-ItemContentTitle"> <components.Snippet hit={item} attribute="name" /> </div> <div className="aa-ItemContentDescription"> <components.Snippet hit={item} attribute="description" /> </div> </div> </div> </div> );

@Haroenv
Copy link
Contributor

Haroenv commented Sep 25, 2023

We don't have plans for this yet, but you can pass createElement and Fragment from Vue wrapped as in the guide to use Vue completely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants