v2.0.0
Breaking release!
This update contains the following changes:
- Removes non-prefixed props. Fixes #7
- No longer merges new model with old one. Fixes #11
- Improved handling of string values in fieldOptions.class
- Added support for passing field model to custom prop
- Previously the field's model was always passed to the
valueprop, but now it can be passed to any prop via thevaluePropoption. The default is stillvalue.- Configure the
valuePropon the field's root object: - or, to set the prop globally for all fields configure the
valuePropproperty on theoptionsobject passed to thevue-form-json-schemacomponent.
- Configure the
- Previously the field's model was always passed to the
- Named export changes
- The project structure has been updated and the named exports have been updated to reflect that. If you only used the default export you will not have to change anything.
vfjsViewer->vfjsGlobalvfjsComponentMixin->vfjsFieldMixin- New export:
vfjsField
- The project structure has been updated and the named exports have been updated to reflect that. If you only used the default export you will not have to change anything.
This is considered a major release due to changing the API with the removal of non-prefixed props. Previously a field's component would get passed the following non-prefixed props:
NOTE: You are only affected by this if your field's component made use of any of these props.
If you for example only used errorHandlerin the field's fieldOptionsyou are not affected by this change. If however your field's component used these props you will have to update to the prefixed version of the prop, see the list below. Note the exception for thevalue prop.
childrencomponenterrorHandlererrorOptionserrorsfieldOptionsidmodelmodelKeyrequiredschemaschemasstatetag**uiSchemavalue*
* The field's model is still passed to the value prop unless the valueKey has been set, either globally or on the field, to another value.
** This property has been removed
As these props are no longer passed to the field's component. Instead use the following prefixed versions:
children->vfjsChildren(orvfjsChildrenUiSchemato get the ui schema instead of the rendered nodes)component->vfjsComponenterrorHandler->vfjsFieldErrorHandlererrorOptions->vfjsFieldOptionserrors->vfjsFieldErrorsfieldOptions->vfjsFieldOptionsid->vfjsFieldIdmodel->vfjsFieldModelmodelKey->vfjsFieldModelKeyrequired->vfjsFieldRequiredschema->vfjsFieldSchemaschemas->vfjsFieldSchemasstate->vfjsFieldStateuiSchema->vfjsFieldUiSchemavalue->vfjsFieldModeltag-> This property has been removed