"Invalid" tag highlight fails to update when tag list changes
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 586
Description
### Environment
SaaS (https://sentry.io/)
### Steps to Reproduce
1. Open an error page where at least one of the tags has a red "" highlight
2. Click on the different tag filters, ex. All, Custom, Application, Client, Other
### Expected Result
The tag that was initially highlighted as invalid is consistently highlighted, and the red highlight disappears when the invalid tag is filtered out.
### Actual Result
The red highlight remains in the same list position. For example, you can see in the screenshots that when the "All" filter is selected, exc_info is highlighted red as invalid (note that it's the 4th item in the list). When I switch to "custom", the internal_product_id (the 4th option in the list) becomes highlighted, even though it was not highlighted before. When I switch to "application", server_name (again the 4th item) is highlighted instead, and same for when I click Other. It seems that once the initial tag list is rendered, items in the list are highlighted based on the position in the list rather than on the content, which means when the list is updated, the highlight remains in the same place even though that is no longer correct.




### Product Area
Issues
### Link
_No response_
### DSN
_No response_
### Version
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.