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
{{ message }}
This repository was archived by the owner on Aug 15, 2020. It is now read-only.
Fixes from code review in json-schema-form#371. Reworked the default destroyStrategy to be picked up directly from globalOptions, instead of looking in formDefaults. Properly handles for the difference between the destroyStrategy declared as undefined and completely undeclared, both at the globalOptions level and the form field definition level.
Copy file name to clipboardExpand all lines: docs/index.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -192,6 +192,7 @@ attribute which should be placed along side `sf-schema`.
192
192
| supressPropertyTitles | by default schema form uses the property name in the schema as a title if none is specified, set this to true to disable that behavior |
193
193
| formDefaults | an object that will be used as a default for all form definitions |
194
194
| validationMessage | an object or a function that will be used as default validation message for all fields. See [Validation Messages](#validation-messages) for details. |
195
+
| destroyStrategy | the default strategy to use for cleaning the model when a form element is removed. see [destroyStrategy](#destroyStrategy) below |
195
196
196
197
*formDefaults* is mostly useful for setting global [ngModelOptions](#ngmodeloptions)
197
198
i.e. changing the entire form to validate on blur.
@@ -830,7 +831,7 @@ will update the model to set the field value to undefined. This can be overridde
830
831
on a field to one of null, empty string (""), undefined, or "retain". Any other value will be ignored and the default
831
832
behavior will apply. The empty string option only applies to fields that have a type of string; using the empty string
832
833
with other field types will just be set to the default destroyStrategy. If you'd like to set the destroyStrategy for
833
-
an entire form, add it to the formDefaults in the [globalOptions](#global-options)
834
+
an entire form, add it to the [globalOptions](#global-options)
0 commit comments