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
Schema Form watches `sf-form` and `sf-schema` and will redraw the form if one or both changes, but
164
-
only if they change completely, i.e. not the same object and/or form instance. For performance
164
+
only if they change completly, i.e. not the same object and/or form instance. For performance
165
165
reasons we have opted to not watch schema and form deeply. So if you have updated a part of the
166
166
schema or the form definition you can trigger a redraw by issuing the event `schemaFormRedraw`.
167
167
@@ -187,13 +187,15 @@ attribute which should be placed along side `sf-schema`.
187
187
`sf-options` takes an object with the following possible attributes.
188
188
189
189
190
-
| Attribute | |
191
-
|:--------------|:------------------------|
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
-
| formDefaults | an object that will be used as a default for all form definitions |
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
-
| setSchemaDefaults | boolean, set to false an no defaults from the schema will be set on the model. |
196
-
| destroyStrategy | the default strategy to use for cleaning the model when a form element is removed. see [destroyStrategy](#destroyStrategy) below |
190
+
| Attribute | Type | |
191
+
|:--------------|:------|:-------------------|
192
+
| supressPropertyTitles | boolean |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
+
| formDefaults | object | an object that will be used as a default for all form definitions |
194
+
| validationMessage | object or function | Object or a function that will be used as default validation message for all fields. See [Validation Messages](#validation-messages) for details. |
195
+
| setSchemaDefaults | boolean | Should schema defaults be set on model. |
196
+
| destroyStrategy | string | the default strategy to use for cleaning the model when a form element is removed. see [destroyStrategy](#destroyStrategy) below |
197
+
| pristine | Object `{errors ,success}` | Sets if errors and success states should be visible when form field are `$pristine`. Default is `{errors:true, success:true}` |
198
+
| validateOnRender | boolean | Should form be validated on initial render? Default `false` |
197
199
198
200
*formDefaults* is mostly useful for setting global [ngModelOptions](#ngmodeloptions)
199
201
i.e. changing the entire form to validate on blur.
0 commit comments