Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Fix library search result rendering #1500

Merged
merged 2 commits into from
May 19, 2022
Merged

Conversation

nya3jp
Copy link
Contributor

@nya3jp nya3jp commented May 2, 2022

ReactList may call itemRenderer with an index larger than list length when the component is being updated. Failing to handle the case causes the rendering to break due to an unhandled exception.

For example, try searching for "audioq". Until one types "audio", search results are correctly narrowed, but typing the final letter "q" does not update the results to zero due to an unhandled exception.

This patch fixes the issue by handling out of band indices in itemRenderer.

Fixes #1109

ReactList may call itemRenderer with an index larger than list length
when the component is being updated. Failing to handle the case causes
the rendering to break due to an unhandled exception.

For example, try searching for "audioq". Until one types "audio",
search results are correctly narrowed, but typing the final letter
"q" does not update the results to zero due to an unhandled exception.

This patch fixes the issue by handling out of band indices in
itemRenderer.

Fixes microsoft#1109
@fearthecowboy
Copy link
Member

/azp run

@nya3jp
Copy link
Contributor Author

nya3jp commented May 14, 2022

microsoft.vscode-arduino is failing, but I can't see the details.

@robotdad robotdad merged commit 7415fae into microsoft:main May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Library search, Serious lack of performance and visual feedback!
3 participants