Code Monkey home page Code Monkey logo

Comments (6)

michaelhume avatar michaelhume commented on May 25, 2024 1

for the record - needed to dig one level deeper

<ais-hits>
    <template v-slot="item">
        <ais-highlight :hit="item.item" attribute="name" />
    </template>
</ais-hits>

from meilisearch-vue.

michaelhume avatar michaelhume commented on May 25, 2024

Hello!

I'm new to this and am also trying to get this working with Vue3 - I can see that the search is working, and I'm getting results back from my server, but I'm having issues rendering the results.

I've tried a few varients of the following without any luck:

<template>
    <ais-instant-search :search-client="searchClient" index-name="users">
        <ais-search-box />
        <ais-hits>
            <template v-slot="item">
                <ais-highlight :hit="item" attribute="name" />
            </template>
        </ais-hits>
    </ais-instant-search>
</template>
<script>
import {instantMeiliSearch} from '@meilisearch/instant-meilisearch';
import InstantSearch from "vue-instantsearch/vue3/es/src/components/InstantSearch";
import AisInstantSearch from "vue-instantsearch/vue3/es/src/components/InstantSearch";
import AisSearchBox from "vue-instantsearch/vue3/es/src/components/SearchBox.vue";
import AisHits from "vue-instantsearch/vue3/es/src/components/Hits.vue";
import AisHighlight from "vue-instantsearch/vue3/es/src/components/Highlight.vue";

export default {
    name: 'search',
    components: {
        AisInstantSearch,
        AisSearchBox,
        AisHighlight,
        AisHits,
    },
    data() {
        return {
            searchClient: instantMeiliSearch(
                "my.server.address"
            ),
        };
    }
}
</script>

Thanks!

from meilisearch-vue.

bidoubiwa avatar bidoubiwa commented on May 25, 2024

Oh! Does it work now ?

from meilisearch-vue.

bidoubiwa avatar bidoubiwa commented on May 25, 2024

fixed by #195

from meilisearch-vue.

JohnDotOwl avatar JohnDotOwl commented on May 25, 2024

@bidoubiwa
https://codesandbox.io/s/ms-vue3-is-0293zk?file=/src/App.vue

When you type in search fast, it won't work it will backspace, i'm facing that issue even in vue 2, any idea what's causing it?

from meilisearch-vue.

bidoubiwa avatar bidoubiwa commented on May 25, 2024

Yes! Unfortunately it comes from instantsearch-vue itself :/ see this issue meilisearch/meilisearch-js-plugins#644

from meilisearch-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.