Coder Social home page Coder Social logo

Comments (5)

turzaizsolt avatar turzaizsolt commented on June 21, 2024

We are experiencing the same issue. Did you manage to find a solution?

from vue-instantsearch.

nasimuddin01 avatar nasimuddin01 commented on June 21, 2024

Facing the same issue in my app too. Any solution you guys managed to find?

from vue-instantsearch.

ymc-sise avatar ymc-sise commented on June 21, 2024

I am facing the same issue.

See movie here:

Bildschirmaufnahme.2022-06-22.um.12.07.36.mov

It happens even if I use the most basic setup (Vue3, no AlpineJS, no TailwindCSS, no jQuery, etc.):

<template>
  <AisInstantSearch
      :index-name="indexName"
      :search-client="searchClient"
  >
    <AisSearchBox />
  </AisInstantSearch>
</template>

But I have to say that I use a typesense search adapter and the response to the server takes around 200ms. When I type a new letter, the letter stays for this 200ms. When the response from typesense is back, in that short moment when the Vue model is updating, the letter is removed and added again.

When I use exactly the same DebouncedSearchBox component from here https://codesandbox.io/s/ms-vue3-is-0293zk?file=/src/App.vue:900-927 with a 10ms delay, then the flickering is gone.

    <AisInstantSearch :index-name="indexName" :search-client="searchClient">
            <DebouncedSearchBox delay="10" />
     </AisInstantSearch>

In my opinion, there is some problem in the $emit here https://github.com/algolia/vue-instantsearch/blob/master/src/components/SearchInput.vue#L27 or with the modelValue here https://github.com/algolia/vue-instantsearch/blob/master/src/components/SearchBox.vue#L156

But its just a best guess.

Please fix it.

from vue-instantsearch.

ymc-sise avatar ymc-sise commented on June 21, 2024

Update: I don't think it has something to do with debouncing as mentioned here https://www.algolia.com/doc/ui-libraries/autocomplete/integrations/with-vue-instantsearch/#debouncing-search-results

It happens as well when typing very slowly:

Bildschirmaufnahme.2022-06-22.um.13.06.59.mov

And as written before, it also happens on a plain site with the default vue-instantsearch components and without Tailwind or Alpine or anything else. Unfortunately I can't test it without a typesense server.

I think the component is re-rendered unnecessary when the model value is updated.

from vue-instantsearch.

ymc-sise avatar ymc-sise commented on June 21, 2024

Thanks a lot. Your fix works for me.

from vue-instantsearch.

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.