vazco/uniforms v3.0.0-alpha.3 Release Notes
Release Date: 2020-05-06 // almost 4 years ago-
- ๐ฅ Breaking: Removed
BaseForm.getChangedKeys
. UsechangedKeys
directly. - ๐ฅ Breaking: Removed default exports in the
uniforms
package. Use named imports instead (e.g.import { BaseForm } from 'uniforms'
). This allows to effectively export types along with values. - ๐ฅ Breaking: Removed
createSchemaBridge
. This includes removal ofBaseForm.state.bridge
,check
on all bridges, and the automatic bridge creation for SimpleSchema. For motivation and more insigths see #718. - ๐ฅ Breaking: Reworked validation flow. For motivation and more insigths see #711.
- Bridge validators can be asynchronous.
- Bridge validators have to return errors instead of throwing them.
onValidate
is no longer using callbacks. The error (or the lack of it) has to be returned either synchronously or asynchronously (i.e. wrapped in a promise).onSubmitSuccess
andonSubmitFailure
got removed. To preserve the current behavior, simply combine them into theonSubmit
:diff -onSubmit={onSubmit} -onSubmitSuccess={onSubmitSuccess} -onSubmitFailure={onSubmitFailure} +onSubmit={model => { + const result = onSubmit(model); + result.then(onSubmitSuccess, onSubmitFailure); + return result; +}}`
- ๐ Changed: For performance reasons
getField
,getSubfields
, andgetType
of all bridges are now memoized. - ๐ Changed: For performance reasons
filterDOMProps.registered
is nowreadonly string[]
instead ofstring[]
. Internally,omit
got replaced withpickBy
andfilterDOMProps.registered
is now sorted.filterDOMProps.register
behavior remains unchanged.
- ๐ฅ Breaking: Removed