Next.js Discord

Discord Forum

NextUI

Unanswered
Cuban Crocodile posted this in #help-forum
Open in Discord
Cuban CrocodileOP
Hello,

I'm working on a legacy project that uses @nextui-org/react version 2.4.8.
In one of my components, I'm using the Autocomplete and AutocompleteItem components from the library.

The component fetches a paginated list of nodes using React Query with infinite scroll, and the fetched data is passed into the Autocomplete.

The issue I'm facing is the following:

When I start typing into the search input and press Enter, the entire entered value gets cleared.
Also, I can't figure out how to programmatically focus or highlight the first result in the dropdown.

I saw that in newer versions of NextUI, the first item gets automatically focused when typing.
However, in version 2.4.8 this doesn't happen, and I can't find any documentation or workaround for it.

0 Replies