Skip to content

💬 Feedback - Autocomplete #2512

@AndrewLeedham

Description

Forma 36 component feedback

There is currently no way to defer/debounce updates to items because their internal rendering is dependent on inputValue.

Essentially, I was trying to improve performance of an Autocomplete input that has several thousand items by adding useDeferredValue from React 18 to de-prioritise the dropdown updates over the input updating as a user is typing. However, after implementing this it was not giving the performance gains I was expecting. Doing some performance profiling, this seems to be because AutocompleteItems is re-rendering every-time inputValue changes to include the highlighting for each item, meaning whatever I do the dropdown will always be re-rendered for every inputValue change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeUsed to mark when a proposal includes breaking changes, therefore it needs a plan for releasecomponent:autocompletestaleUsed to mark when there was no activity for a set period of time

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions