Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💬 Feedback - Autocomplete #2512

Open
AndrewLeedham opened this issue Jun 26, 2023 · 4 comments
Open

💬 Feedback - Autocomplete #2512

AndrewLeedham opened this issue Jun 26, 2023 · 4 comments
Labels
breaking change Used to mark when a proposal includes breaking changes, therefore it needs a plan for release component:autocomplete stale Used to mark when there was no activity for a set period of time

Comments

@AndrewLeedham
Copy link
Contributor

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.

@Lelith
Copy link
Collaborator

Lelith commented Jul 4, 2023

Hey Andrew, thank you for your feedback. The Autocomplete component is a candidate for a major update in the next version. But we do not yet have a proper roadmap for forma36 v5, so i can't give any dates when it will happen.

In the meantime i can only recommend you, trying to leverage the multiselect component (if you have a multi-select case) or recreate the behaviour using the popover component with an text-input field.

@Lelith Lelith added the breaking change Used to mark when a proposal includes breaking changes, therefore it needs a plan for release label Jul 4, 2023
@AndrewLeedham
Copy link
Contributor Author

Thanks for the response @Lelith. The performance issues aren't urgent, so will probably wait for v5. For context, the reason I am using Autocomplete is because it is suggested when migrating from v3's dropdown.

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Marking issue as stale since there was no activity for 30 days

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Aug 4, 2023
@Lelith Lelith added component:autocomplete and removed stale Used to mark when there was no activity for a set period of time labels Apr 5, 2024
Copy link

github-actions bot commented May 6, 2024

Marking issue as stale since there was no activity for 30 days

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Used to mark when a proposal includes breaking changes, therefore it needs a plan for release component:autocomplete stale Used to mark when there was no activity for a set period of time
Projects
None yet
Development

No branches or pull requests

2 participants