-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: add default initial value for form component state #396
Conversation
d56a28e
to
ecbd5b5
Compare
export const PrimitiveDefaultPropertyValue: Partial< | ||
Record<Primitive, { [property: string]: FixedStudioComponentProperty }> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's more succinct or readable, but I think this can be defined as a PrimitiveLevelPropConfig<FixedStudioComponentProperty>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice! I didn't notice we had that.
Codecov Report
@@ Coverage Diff @@
## tagged-release/q1-release #396 +/- ##
=============================================================
- Coverage 93.27% 93.27% -0.01%
=============================================================
Files 43 43
Lines 1681 1695 +14
Branches 370 375 +5
=============================================================
+ Hits 1568 1581 +13
- Misses 110 111 +1
Partials 3 3
Continue to review full report at Codecov.
|
Description of changes:
Set default initial state value for form components.
List was determined by interacting with TwoWayBinding tests on integration app and adding default initial values for components that gave a warning.
Todo in another change:
If a
defaultValue
is set by the customer and the component becomes controlled the defaultValue needs to be removed because the form components cannot have bothdefaultValue
andvalue
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.