Skip to content
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

fix: fix add button disabled state on validation failure #1076

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

zchenwei
Copy link
Contributor

@zchenwei zchenwei commented Aug 14, 2023

Problem

Fix #961

Solution

We should not disabled the Add button when validation fails and instead invoke runValidation again when adding a new item to refresh the error state. That way a user will be able to add the missing field by clicking the button straight without having to clear the input or type in something to refresh before adding a value.

disable-bug

Additional Notes

Links

Ticket

GitHub issue:

Other links

Verification

Manual tests

Automated tests

  • Unit tests added/updated
  • E2E tests added/updated
  • N/A - (provide a reason)
  • deferred - (provide GitHub issue for tracking)

Housekeeping

  • No non-essential console logs
  • All new files contain license notice

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@zchenwei zchenwei requested a review from a team as a code owner August 14, 2023 23:42
@codecov-commenter
Copy link

Codecov Report

Merging #1076 (b3cced0) into main (7294698) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1076   +/-   ##
=======================================
  Coverage   93.88%   93.88%           
=======================================
  Files         124      124           
  Lines        5841     5842    +1     
  Branches     1775     1775           
=======================================
+ Hits         5484     5485    +1     
  Misses        339      339           
  Partials       18       18           
Files Changed Coverage Δ
...-ui-react/lib/utils/forms/array-field-component.ts 100.00% <ø> (ø)
...b/forms/form-renderer-helper/render-array-field.ts 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7294698...b3cced0. Read the comment docs.

@zchenwei zchenwei merged commit a3ba324 into main Aug 15, 2023
@zchenwei zchenwei deleted the chenwz-dev-disabledadd branch August 15, 2023 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After a failed relationship field validation the "Add" button is disabled
5 participants