Skip to content

Bug with search suggestions #171

Description

@jsma

We've noticed an odd issue with how React is handling search suggestions (disclaimer, I'm unfamiliar with React and there isn't a dist.js.map included so my debugging abilities are somewhat limited).

For example, we have a field for US Counties. I can see in my browser's inspect tool that on initial page load, it automatically loads in the first 100 results but keeps them hidden until I click into the search field.

Screenshot 2023-12-08 at 12 12 41 PM

Next, I attempt to search for "Bucks County, PA". First I type "b" which shows results that contain "b":

Screenshot 2023-12-08 at 12 13 39 PM

As I type the rest of "buck", I briefly see it narrow things down to the only two results that should match:

Screenshot 2023-12-08 at 12 14 09 PM

But then it goes haywire and reverts to showing all the results that it fetched when I typed "bu":

Screenshot 2023-12-08 at 12 13 56 PM

I've noticed that this happens when I type quickly but if I type slowly, one character at a time, and wait for the suggestion results to display for each character typed, then the correct suggestions are shown and are sticky, it doesn't bounce back to some previous result set. If I type faster than it can update the display of results, it still fetches the results for each step of the query but gets very confused about which result set it should display for the current input value.

In the above example, the only reason it reverted to the "bu" results is that I paused after typing the "b" to get a screen shot for this issue. If I reload the page and quickly type the full word "buck", it will revert to the results for the letter "b".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions