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: add default value support for controlled textfield components #884

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

scottyoung
Copy link
Contributor

@scottyoung scottyoung commented Jan 11, 2023

Description of changes:
This is a follow up to moving TextField to a controlled component. Since it's controlled, we can no longer use the defaultValue param, we have to pass in the default value to the initialValue object.

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

@scottyoung scottyoung requested a review from a team as a code owner January 11, 2023 18:54
@codecov-commenter
Copy link

Codecov Report

Merging #884 (7375509) into main (7c5ab39) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #884      +/-   ##
==========================================
+ Coverage   92.94%   92.96%   +0.01%     
==========================================
  Files         117      117              
  Lines        4961     4974      +13     
  Branches     1441     1446       +5     
==========================================
+ Hits         4611     4624      +13     
  Misses        329      329              
  Partials       21       21              
Impacted Files Coverage Δ
...lib/generate-form-definition/helpers/form-field.ts 98.92% <ø> (ø)
...react/lib/forms/form-renderer-helper/form-state.ts 98.83% <100.00%> (+0.04%) ⬆️
.../codegen-ui-react/lib/forms/react-form-renderer.ts 95.81% <100.00%> (ø)
packages/codegen-ui-react/lib/helpers/index.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

@scottyoung scottyoung merged commit b90e191 into main Jan 17, 2023
@scottyoung scottyoung deleted the fix/default-value branch January 17, 2023 19:40
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.

None yet

5 participants