Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear field error state if the field is cleared (#2424)
## Summary: Previously, if a MultiSelect component had shortcuts enabled, if it was in an error state, the "select all" and "select none" options do not clear the error state. Changing the selected values using these shortcuts now clear the error. Issue: WB-1846 ## Test plan: ### MultiSelect #### Select none 1. Navigate to `?path=/story/packages-dropdown-multiselect--error-from-validation` and confirm that the shortcuts control is enabled 2. Press the "Select none" option on the field that has an error already 3. Verify that the error message is cleared, even after blurring the field (since Jupiter is not selected) #### Select all 1. Navigate to `?path=/story/packages-dropdown-multiselect--error-from-validation` and confirm that the shortcuts control is enabled 2. Press the "Select all" option on the field that has an error already 3. Verify that the error message is cleared. After blurring the field, the error message should return since Jupiter is selected Author: beaesguerra Reviewers: beaesguerra, jandrade Required Reviewers: Approved By: jandrade Checks: ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 20.x), ✅ Lint / Lint (ubuntu-latest, 20.x), ✅ Test / Test (ubuntu-latest, 20.x, 2/2), ✅ Test / Test (ubuntu-latest, 20.x, 1/2), ✅ Check build sizes (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 20.x), ⏭️ Chromatic - Skip on Release PR (changesets), ⏹️ [cancelled] Chromatic - Get results on regular PRs, ✅ gerald, ⏹️ [cancelled] Test / Test (ubuntu-latest, 20.x, 2/2), ⏹️ [cancelled] Test / Test (ubuntu-latest, 20.x, 1/2), ⏹️ [cancelled] Lint / Lint (ubuntu-latest, 20.x), ⏹️ [cancelled] Check build sizes (ubuntu-latest, 20.x), ⏹️ [cancelled] Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ⏹️ [cancelled] Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 20.x), ⏹️ [cancelled] Publish npm snapshot (ubuntu-latest, 20.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ⏭️ Chromatic - Skip on Release PR (changesets), ✅ gerald, ⏭️ dependabot Pull Request URL: #2424
- Loading branch information