-
Notifications
You must be signed in to change notification settings - Fork 13
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
Update vue 3 getting started sample code #120
Conversation
Hello @amit-ksh, PS: This message was sent automatically! |
Hey @amit-ksh ! Thanks for waiting, your PR flew under the radar! I'll be reviewing it ASAP! |
I tried your sample out but unfortunately it does not work. Any idea why? <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@meilisearch/instant-meilisearch/templates/basic_search.css" />
</head>
<body>
<div id="app" class="wrapper">
<ais-instant-search :search-client="searchClient" index-name="movies">
<ais-configure :hits-per-page.camel="10" />
<ais-search-box placeholder="Search here…" class="searchbox"></ais-search-box>
<ais-hits>
<div slot="item" slot-scope="{ item }">
<ais-highlight :hit="item" attribute="title" />
</div>
</ais-hits>
</ais-instant-search>
</div>
</body>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-instantsearch/vue3/umd/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@meilisearch/instant-meilisearch/dist/instant-meilisearch.umd.min.js">
</script>
<script>
const app = Vue
.createApp({
data() {
return {
searchClient: instantMeiliSearch('http://127.0.0.1:7700')
}
}
})
.use(VueInstantSearch)
.mount("#app");
</script>
</html> |
I don't know why it's not working, app is importing all the packages correctly but not able to use it plugin as well as the styled components. |
Is it working for you? |
No, it's not working for me also. In the console, warning is logging out for |
😕 Tell me if you achieve to make it work. Meanwhile I put this in draft. |
OK! |
Hey @bidoubiwa! I fix the sample code, would you review it again? |
This message is sent automatically Thanks again for contributing to Meilisearch ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Sorry for the delay I was on sick leave.
I'm happy to see that the samples work with vue 3 :) Is it possible to give them the same style as the vue2
one?
The sample should be as minimal as possible
I will definitely give a try |
Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
Made all the requested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for fixing these bugs so quickly 🙏
Once you're done, can you put the two code samples in a new file named
.code-samples-vue-3.meilisearch.yaml
?
Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
@bidoubiwa could you review my changes please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this small change I think the PR is good to be merged :)
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🔥 Thanks a lot
This message is sent automatically Thanks again for contributing to Meilisearch ❤️ |
Pull Request
Related issue
Fixes #117
What does this PR do?
Update the vue 3 getting started sample code from vue 2 in README.md
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!