primevue icon indicating copy to clipboard operation
primevue copied to clipboard

Autocomplete: Dropdowns and searching has buggy and unpredictable results

Open matthew-dean opened this issue 10 months ago • 1 comments

Describe the bug

Because of this issue and this issue, I thought perhaps that I was using Dropdown in a way that it wasn't designed for, so I decided to try Autocomplete.

The use case is that the backing data is a massive payload, so I've simulated a delay for retrieving records. However, I kept getting strange behavior, which I've replicated in the Stackblitz, and have taken a video of, like:

  • Clicking the dropdown calls the @complete event with an empty query value, ~which I don't think is documented (and is counter-intuitive)~ (I see now that the docs say that dropdownMode sends a blank query by default which... okay, that's still bizarre rather than setting that behavior explictly through a dropdown event, but regardless, I can't get the dropdown list to populate with the suggestions even when the mode is set to "current")
  • Items can be returned / bound to suggestions, but the dropdown will not open with results
  • The Autocomplete can get stuck in a "loading" state, despite loading being set explicitly to false

(I made a repro video of this but Github said it was too big... I'll try to re-attach later)

Reproducer

https://stackblitz.com/edit/primevue-create-vue-typescript-issue-template-iq2qv7?file=package.json,src%2FApp.vue

PrimeVue version

3.47.2

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

Chrome 123

Steps to reproduce the behavior

  1. Go to Stackblitz
  2. Try entering / deleting values and pressing tab quickly away from the box to see a stuck loading state
  3. Try entering / deleting values quickly to see values bound but not shown

Expected behavior

Autocomplete works

matthew-dean avatar Apr 16 '24 15:04 matthew-dean

Can someone pleeeeease tell me how to get AutoComplete to work without bugs??

matthew-dean avatar Apr 24 '24 23:04 matthew-dean