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: store selected relationship data for scalar fields #1077

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

rtpascual
Copy link
Contributor

@rtpascual rtpascual commented Aug 16, 2023

Problem

For forms with GraphQL, scalar relationship autocomplete fields can load with the badge text as undefined.

Solution

Store relationship data in local state for badge text with the autocomplete options as a fallback for when a customer selects an autocomplete option.

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.

@rtpascual rtpascual marked this pull request as ready for review August 16, 2023 19:17
@rtpascual rtpascual requested a review from a team as a code owner August 16, 2023 19:17
Jshhhh
Jshhhh previously approved these changes Aug 16, 2023
@rtpascual rtpascual force-pushed the selected-relationship branch from c8b3c0c to 92b915b Compare August 16, 2023 23:46
@codecov-commenter
Copy link

Codecov Report

Merging #1077 (92b915b) into main (a3ba324) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1077      +/-   ##
==========================================
+ Coverage   93.88%   93.90%   +0.01%     
==========================================
  Files         124      124              
  Lines        5842     5853      +11     
  Branches     1775     1780       +5     
==========================================
+ Hits         5485     5496      +11     
  Misses        339      339              
  Partials       18       18              
Files Changed Coverage Δ
...act/lib/forms/form-renderer-helper/relationship.ts 93.04% <ø> (ø)
...react/lib/forms/form-renderer-helper/form-state.ts 98.94% <100.00%> (+0.01%) ⬆️
...act/lib/forms/form-renderer-helper/model-values.ts 92.48% <100.00%> (+0.17%) ⬆️
...b/forms/form-renderer-helper/render-array-field.ts 100.00% <100.00%> (ø)
.../codegen-ui-react/lib/forms/react-form-renderer.ts 96.66% <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 a3ba324...92b915b. Read the comment docs.

@rtpascual rtpascual merged commit 0ed3590 into main Aug 17, 2023
@rtpascual rtpascual deleted the selected-relationship branch August 17, 2023 02:45
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.

4 participants