Skip to content

fix(components): reset error when the component props have changed #726

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

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

fengelniederhammer
Copy link
Collaborator

Summary

  • Take the "Text input - Default" story
  • change the lapisField to "hos" (i.e. making it an invalid field)
  • The component will show an error, because LAPIS shows an error
  • change the lapisField to "host" (i.e. making it a valid field again)

Before: It would still show an error until you click "Try again"
Now: It rerenders and doesn't show an error anymore

Related to GenSpectrum/dashboards#530

Screenshot

PR Checklist

- [ ] All necessary documentation has been adapted.
- [ ] The implemented feature is covered by an appropriate test.

* Take the "Text input - Default" story
* change the `lapisField` to "hos" (i.e. making it an invalid field)
* The component will show an error, because LAPIS shows an error
* change  the `lapisField` to "host" (i.e. making it a valid field again)
Before: It would still show an error until you click "Try again"
Now: It rerenders and doesn't show an error anymore

Related to GenSpectrum/dashboards#530
@fengelniederhammer fengelniederhammer added the components Regarding the components label Feb 6, 2025
Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2025 10:58am

Copy link
Contributor

github-actions bot commented Feb 6, 2025

This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog.

Note that this might contain changes that are on main, but not yet released.

Changelog:

0.14.2 (2025-02-06)

Bug Fixes

  • components: reset error when the component props have changed (d7d22ab)

@fengelniederhammer fengelniederhammer self-assigned this Feb 6, 2025
Copy link
Collaborator

@JonasKellerer JonasKellerer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
components Regarding the components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants