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
Make fields with const pre-fiiled and readonly #3843 (#4326)
* Make fields with const pre-fiiled and readonl
* fixed issue with default on root level.
* fixed array const populate values
* fixed array issue and written tests to cover the behavior
* updated changeLog
* fixed issue with core failing tests.
* changed changeLog to rerun tests
* improvement based on feedback
* Update packages/utils/test/schema/getDefaultFormStateTest.ts
Adding default that should not be used
* Update packages/utils/test/schema/getDefaultFormStateTest.ts
Fix linter
---------
Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Heath C <[email protected]>
* @param requiredFields - The list of fields that are required
94
97
* @param experimental_defaultFormStateBehavior - Optional configuration object, if provided, allows users to override
95
98
* default form state behavior
99
+
* @param isConst - Optional flag, if true, indicates that the schema has a const property defined, thus we should always return the computedDefault since it's coming from the const.
96
100
*/
97
101
functionmaybeAddDefaultToObject<T=any>(
98
102
obj: GenericObjectType,
@@ -101,10 +105,13 @@ function maybeAddDefaultToObject<T = any>(
0 commit comments