fix(website): repairs broken variant selector in variant explorer (W-ASAP) #951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #950
Summary
In #940 the field name was made configurable, but the hardcoded name used in the destructing of the object wasn't changed: https://github.com/GenSpectrum/dashboards/pull/940/files#diff-30ad9ef617a4a872e53ac66e262725a87988183be5674c0b9d412ed5822c7d06L36
The test didn't catch this, because the test also uses the same hardcoded field name (
pangoLineage): https://github.com/GenSpectrum/dashboards/blob/HEAD/website/src/components/pageStateSelectors/wasap/filters/VariantExplorerFilter.browser.spec.tsx#L46-L75The fix: Just use the proper field name to access the the value in the callback parameter. The same problem was also in the "untracked" mode.
Since this was caused by hardcoded variable names, which we have not configured, I don't think it's necessary to adapt the test or create a second case for this.
Screenshot
Screen.Recording.2025-12-08.at.20.53.02.mov
PR Checklist
All necessary documentation has been adapted.The implemented feature is covered by an appropriate test.