You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see above link. if form value is falsy control component fallbacks to empty string. This misdirects to developers and causes to break type strict codes.
For example; A react native date picker component requires value as Date object or undefined and control value fallbacks to empty string when passed value undefined for an unselected date. Due to react-native, it crashes the app because native code expects Date object.
The text was updated successfully, but these errors were encountered:
addeddefaultValue prop to Foect.Control for backward compatibility (defaults to empty string), can you try <Foect.Control defaultValue={undefined} ...> with version 0.1.6?
I think this can make it worse. Looks like this increases inconsistency with form default value and make things more complicated. I would prefer giving fallback value explicitly from form values.
foect/src/control.ts
Line 70 in 834f4a8
As you can see above link. if form value is falsy control component fallbacks to empty string. This misdirects to developers and causes to break type strict codes.
For example; A react native date picker component requires value as Date object or undefined and control value fallbacks to empty string when passed value undefined for an unselected date. Due to react-native, it crashes the app because native code expects Date object.
The text was updated successfully, but these errors were encountered: