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
value
prop, but now it can be passed to any prop via thevalueProp
option. The default is stillvalue
.- Configure the
valueProp
on the field's root object: - or, to set the prop globally for all fields configure the
valueProp
property on theoptions
object passed to thevue-form-json-schema
component.
- 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
->vfjsGlobal
vfjsComponentMixin
->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 errorHandler
in the field's fieldOptions
you 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.
children
component
errorHandler
errorOptions
errors
fieldOptions
id
model
modelKey
required
schema
schemas
state
tag
**uiSchema
value
*
* 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
(orvfjsChildrenUiSchema
to get the ui schema instead of the rendered nodes)component
->vfjsComponent
errorHandler
->vfjsFieldErrorHandler
errorOptions
->vfjsFieldOptions
errors
->vfjsFieldErrors
fieldOptions
->vfjsFieldOptions
id
->vfjsFieldId
model
->vfjsFieldModel
modelKey
->vfjsFieldModelKey
required
->vfjsFieldRequired
schema
->vfjsFieldSchema
schemas
->vfjsFieldSchemas
state
->vfjsFieldState
uiSchema
->vfjsFieldUiSchema
value
->vfjsFieldModel
tag
-> This property has been removed