uniforms
Core package of
uniforms
.
Install
$ npm install uniforms
For more in depth documentation see uniforms.tools.
Core package of uniforms.
Core package of
uniforms
.
$ npm install uniforms
For more in depth documentation see uniforms.tools.
tslib
issue #1378uniforms-bootstrap3
package #1341uniforms-material
package #1338uniforms-bridge-simple-schema
package #1323uniforms-bridge-graphql
package #1322onChangeModel
- add details about what changed. #1363TextField
and LongTextField
#1356.refine
and .superRefine
#1319BaseForm
types #1325label
and placeholder
. #973allowedValues
and transform
with options
. #806minLenght
and maxLength
in LongTextField
in uniforms-bootstrap5
. #1252min
and max
in DateField
in uniforms-material
and uniforms-mui
. #1213minLenght
and maxLength
in TextField
in uniforms-bootstrap5
. #1223inputRef
type in NumField
in uniforms-antd
due to compatibility problems. #1230ListDelField
in uniforms-bootstrap5
. #1226experimental_absoluteName
prop on AutoField
. #1126any
s with unknown
s, forcing Model
to be an object, and getting rid of DeepPartial
. #1205JSONSchemaBridge
typings. #1158props
argument from Bridge.getProps
. #1206getInitialValue
works with undefined
s. #1171component
prop check from the AutoField
to the defaultComponentDetector
. #1114autoField
prop from QuickForm
and its descendants. #980props
argument from getInitialValue
. It also implies removal of the initialCount
prop from all bridges and ListField
s. #1048AutoFields
render Fragment
instead of div
by default. #1173DateField
not always formatting correctly. #1162DateField
not always rendering correctly. #1138GraphQLSchemaBridge
. #1135JSONSchemaBrdige
. #1131getInitialValue
) for objects just like for arrays, i.e., recursively for all subfields. #1112uniforms-mui
. #1054SelectField
in uniforms-material
. #1111kind="leaf"
fields created using connectField
will skip unnecessary context providers. #1108type="date"
in DateField
. #1099joinName
. #963formRef
. #974minCount
and maxCount
JSON Schema properties are now registered in filterDOMProps
by default. #981getNativeFormProps
. #1037useField
without name
. #976initialValue
in NumField
. #969label
in BoolField
in uniforms-semantic
. #1042type
in both SimpleSchema-based bridges. #1039uniforms-material
are now respecting the theme correctly. #993ListAddField
and ListDelField
in uniforms-antd
for `antd@4.16.13`. #1004changedKeys
. #982$ref
s in JSONSchemaBrdige
. #1006DateField
, LongTextField
, NumField
, and TextField
in uniforms-material
are now correctly based on TextFieldProps
. #987package.json
are now relative. #992module
usage in package.json
. None of the uniforms packages requires special Babel handling anymore (e.g., meteor.nodeModules.recompile
in Meteor). #986FieldProps
problems with type unions. #971JSONSchemaBridge
is now much faster. #957DateField
in uniforms-material
. #961null
handling in getErrorMessages
in GraphQLSchemaBridge
. #950tslib
to 2.2.0. #949object
fields with no properties
in JSONSchemaBridge
. #934uniforms-bootstrap4
. #904changedKeys
helper. #953JSONSchemaBridge
. #923showInlineError
on AutoFields
. #827anyOf
cases in JSONSchemaBridge
. #919setTimeout
of BaseForm
. #920filterDOMProps
helper. #939joinName
helper. #935submitted
. #889uniforms-bootstrap5
. #874initialCount
in optional list fields. #875JSONSchemaBridge
errors with top-level fields containing spaces. #909sideEffect
configuration in uniforms-bridge-simple-schema
and uniforms-bridge-simple-schema-2
. #888SelectField
in uniforms-semantic
. #873ListField
in uniforms-antd
. #844layout
prop in BaseForm
in uniforms-antd
to match AntD capabilities. #861sideEffects
flag to let bundlers do better at tree shaking. #843readOnly
prop in all form and field components. #674AutoField
component. #640SelectField
prop in all themes. #737step
prop in NumField
in uniforms-material
. #855NumField
behavior across themes. #856AutoForm
model
, autosave is now always asynchronous. #832row
for RadioField
in uniforms-material
. #834return
and throw
in onSubmit
are no longer allowed. To return an error or some result, return Promise
instead. #819filterDOMProps.register
calls added in #803. #815autoComplete
prop is now correctly used in TextField
. #809validateStatus
prop is now correctly handled in wrapField
in uniforms-antd
. #817useField
and connectField
. #816disableItem
prop in SelectField
. #736textFieldProps
prop in SelectField
in uniforms-material
. #700GraphQLBridge.getField
. #769JSONSchemaBridge
. #748SelectField
in uniforms-bootstrap4
. #785, #793graphql
version for uniforms-bridge-graphql
is now 15.0.0
. #781uniforms-antd
fields. #773ListItemField
.AutoForm
validation. #769antd
version for uniforms-antd
is 4.0.0
. #696@material-ui/core
version for uniforms-material
is 4.0.0
. #758FieldProps
and HTMLFieldProps
utility types. #760Added: Improved typing of filterDOMProps
. To properly register a new property, extend FilterDOMProps
interface. #763
declare module 'uniforms' {
interface FilterDOMProps {
customPropToFilter: never;
}
}
filterDOMProps.register('customPropToFilter');
Fixed: Escaping special characters. #753
AutoForm
regression. #765modelSync
from AutoForm
state. #739kind: 'leaf' | 'node'
flag for connectField
. #741properties
and required
in JSONSchemaBridge
. #746injectName
helper. It was used to force context updates and got replaced by the new context directly. #720includeInChain
option of connectField
. #738ListField
components family. #721$ref
s in JSONSchemaBridge
. #722BaseForm.getChangedKeys
. Use changedKeys
directly.uniforms
package. Use named imports instead (e.g. import { BaseForm } from 'uniforms'
). This allows to effectively export types along with values.createSchemaBridge
. This includes removal of BaseForm.state.bridge
, check
on all bridges, and the automatic bridge creation for SimpleSchema. For motivation and more insigths see #718.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
and onSubmitFailure
got removed. To preserve the current behavior, simply combine them into the onSubmit
:
`
diff
-onSubmit={onSubmit}
-onSubmitSuccess={onSubmitSuccess}
-onSubmitFailure={onSubmitFailure}
+onSubmit={model => {``
getField
, getSubfields
, and getType
of all bridges are now memoized.filterDOMProps.registered
is now readonly string[]
instead of string[]
. Internally, omit
got replaced with pickBy
and filterDOMProps.registered
is now sorted. filterDOMProps.register
behavior remains unchanged.import BaseForm from 'uniforms/BaseForm'
) to es5
directories. Try not to rely on that and use let your bundler do its best (e.g. import { BaseForm } from 'uniforms'
).BaseField
from uniforms
. Migrate to useField
.baseField
from connectField
. Migrate to useField
.ensureValue
from connectField
. You have to do it manually (e.g. do value ?? ''
instead of value
).includeParent
from connectField
. Use useField
as many types as needed.mapProps
from uniforms
. Migrate to useField
.changed
, changedMap
, submitting
, and validating
were lifted from state
to the root.useField
and useForm
in uniforms
.SelectField
in uniforms-antd
. #691componentWillReceiveProps
and componentWillMount
.id
attributes. #671initialCount
and minCount
in GraphQLBridge
, SimpleSchemaBridge
and SimpleSchema2Bridge
. #656connectField
but will break all components using context directly. As there's no documentation yet, see this commit to see what changed. To have an idea on how to proceed, see this commit.NumField
.nothing
from uniforms
as it's not needed in React >= 15.prop-types
entirely in favor of incoming typings.tslib
. #648globalThis
. #641module
keyword in package.json
. If your bundler supports tree shaking, you no longer have to use direct imports manually - simply use import { X } from 'uniforms'
. #612NumField
in uniforms-material
. #631.wrapField
export in uniforms-material
. #629.any
) typings.type
in JSONSchemaBridge
. #604dataPath
in JSONSchemaBridge
. #593GraphQLSchemaBridge
. #577placeholder
and label
in JSONSchemaBridge
. #586getProps
between all bridges. Right now it has a clear semantic: bridge.getProps(fieldName[, props])
should resolve all props that the schema defines, based on the field definition and given props (if applicable). Especially, it should not merge in given props
nor resolve the final label
or placeholder
- BaseField
handles that. It'll affect you only if you've called getProps
directly. It also got rid of some additional undefined
props in JSONSchemaBridge
.default
attribute in JSONSchemaBridge
. #569placeholder
and required
props in most themes. #570SelectField
in uniforms-antd
. #568extra
and help
in uniforms-antd
theme. #559NumFields
in most themes is now React version specific. #558BoolField
in uniforms-antd
. #563labelClassName
in uniforms-bootstrap3
and uniforms-bootstrap4
themes. #548required
validation in JSONSchemaBridge
. #554SelectField
with checkboxes
in uniforms-antd
. #549@material-ui/core@4
. #542GraphQLBridge
. #535SelectField
in uniforms-material
rendered inline error twice in certain situations.Breaking: Separated schema packages. These are now:
uniforms-bridge-graphql
uniforms-bridge-json-schema
uniforms-bridge-simple-schema
uniforms-bridge-simple-schema-2
To register a new schema, import uniforms-bridge-X
or uniforms-bridge-X/register
directly. Named exports and file names haven't changed, so imports looks like this:
// GraphQL
-import { GraphQLBridge } from 'uniforms';
+import { GraphQLBridge } from 'uniforms-bridge-graphql';
-import GraphQLBridge from 'uniforms/GraphQLBridge';
+import GraphQLBridge from 'uniforms-bridge-graphql/GraphQLBridge';
// JSON Schema
-import { JSONSchemaBridge } from 'uniforms';
+import { JSONSchemaBridge } from 'uniforms-bridge-graphql';
-import JSONSchemaBridge from 'uniforms/JSONSchemaBridge';
+import JSONSchemaBridge from 'uniforms-bridge-json-schema/JSONSchemaBridge';
// SimpleSchema (Atmosphere version for Meteor)
-import { SimpleSchemaBridge } from 'uniforms';
+import { SimpleSchemaBridge } from 'uniforms-bridge-simple-schema';
-import SimpleSchemaBridge from 'uniforms/SimpleSchemaBridge';
+import SimpleSchemaBridge from 'uniforms-bridge-simple-schema/SimpleSchemaBridge';
// SimpleSchema (npm version)
-import { SimpleSchema2Bridge } from 'uniforms';
+import { SimpleSchema2Bridge } from 'uniforms-bridge-simple-schema-2';
-import SimpleSchema2Bridge from 'uniforms/SimpleSchema2Bridge';
+import SimpleSchema2Bridge from 'uniforms-bridge-simple-schema-2/SimpleSchema2Bridge';
Breaking: Packages depending on the uniforms
package are now using dependency
instead of the peerDependency
. Same goes for the schema packages and their schema respectives:
uniforms-bridge-graphql ~> graphql
uniforms-bridge-simple-schema-2 ~> simpl-schema
jsnext:main
and module
from package.json
in all packages. It means that bundlers like Webpack will load the fully transpiled version now. It caused more troubles than it's worth. The original sources are still shipped in src
directory.QuickForm.render
logic was moved to QuickForm.getNativeFormProps
. BaseForm
is now the only form component with an explicit render
method, what is good for custom themes and form components.SubmitField
in uniforms-material
now uses children
by default and fallback to label
. #523createSchemaBridge.register
for registering custom bridges.onSubmit
to the context data. Now every field can trigger the submit directly, without the form ref.SelectField
label shrink state in uniforms-material
. #522SelectField
required state in uniforms-material
. #512NumField
value parsing in uniforms-material
. #516$ref
property in JSONSchemaBridge
. #5071.30.0
in uniforms-material
theme. #501uniforms-material
theme. #505variant
prop in most uniforms-material
fields. #495variant
in uniforms-material. Minimum version of @material-ui/core
is now 1.2.0
. #498placeholder
in SelectField
in uniforms-material
. #489ListField
.setState
on an unmounted component. #490file:../uniforms
.label
now defaults to title
in JSONSchemaBridge
. #488SelectField
in uniforms-semantic
. #482labelProps
props in DateField
and SelectField
in uniforms-material
. #485submitting
and validating
states in context. #449invariant
and warning
dependencies as React no longer depends on fbjs
. #475@material-ui/core@3.0.0
.@material-ui/core
is 1.5.1, due to Babel updated.core-js
polyfills are automatically included.checkboxes
prop in uniforms-antd
.displayName
s.graphql
dependency. #467fieldType
for GraphQLBridge
. #460ValidatedForm
. #471RadioField
handles error and help texts without warnings in uniforms-material
.text
prop in TextField
in uniforms-material
.uniforms-material
to @material-ui/core
. #349wrapperStyle
to filterDOMProps
defaults. #430ListAddField
now clones given value
to not keep its reference. #428GraphQLBridge
and JSONSchemaBridge
. #421SubmitField
labels.ListAddField
and ListDelField
in uniforms-bootstrap4
now use .badge
instead of .label
styling. #419rows
in LongTextField
in uniforms-bootstrap3
. #418style
was incorrectly used in uniforms-antd
, therefore it was renamed to wrapperStyle
. #416style
in uniforms-antd
. #404allowedValues
to filterDOMProps
defaults. #403transform
to filterDOMProps
defaults. #399onSubmit
rejects, it's treated as a form error.form.submit
correctly rejects on validation error.ListField
and NestField
. #366wrapClassName
in uniforms-semantic
. #358babel-plugin-transform-react-inline-elements
. #359DateField
. #357uniforms-bootstrap3
and uniforms-bootstrap4
. #350GraphQLID
in GraphQLBridge
. #281error
prop is not changing from null
to undefined
after validation.checkbox
in BoolField
in uniforms-antd
. #348type
prop in TextField
in uniforms-antd
. #345Boolean
type in GraphQLBridge
. #335BoolField
in uniforms-semantic
. #338lodash.x
packages to lodash/x
. It will increase node_modules
size but probably reduce your bundle size as many projects are already using lodash
which lead to having both lodash.x
and lodash/x
in the bundle.SelectField
in uniforms-antd
.div
in NestField
in uniforms-antd
.div
in wrapField
in both uniforms-bootstrap3
and uniforms-bootstrap4
.gridClassName
always returns a string in both uniforms-bootstrap3
and uniforms-bootstrap4
.ErrorsField
is now styled in both uniforms-bootstrap3
and uniforms-bootstrap4
. #301LongTextField
label htmlFor
in uniforms-semantic
.placeholder
prop in SelectField
in uniforms-antd
.HiddenField
now behaves the same in every theme.RadioField
spacing in uniforms-bootsrap4
. #304hintText
prop instead of placeholder
in LongTextField
in uniforms-material
.SubmitField
respects disabled
prop.BaseField
props calculation.prop-types
.Bridge.check
error message.error
, not errorMessage
. #267BoolField
in uniforms-antd
.ListField
in uniforms-semantic
.DateField
in uniforms-material
. #246GraphQLBridge
. #244multiple
in SelectField
in uniforms-material
. #236changed
and changedMap
.AutoField
.colon
and required
in uniforms-antd
. #229grouped
in uniforms-semantic
. #227in
uniforms-material`. #232labelCol
and wrapperCol
in uniforms-antd
. #207uniforms-antd
. #203rows
in LongTextField
in uniforms-bootstrap4
. #208TextField
warning in uniforms-material
. #205HiddenField
display name.NumField
.onSubmit
after mount with autosave
. #204itemProps
in ListField
in uniforms-antd
.itemProps
in NestField
. #181uniforms-antd
. #199uniforms-antd
.appearance
prop in BoolField
in uniforms-material
. #189children
instead of specified props in ListAddField
in uniforms-material
.children
instead of specified props in ListDelField
in uniforms-material
.decimal
in NumField
. #167defaultValue
in SimpleSchema2Bridge
. #182DateField
warning in uniforms-material
.ListAddField
in uniforms-material
.ListDelField
in uniforms-material
.initialValue
in GraphQLBridge
. #183<section>
s tags are now <div>
s. #172step
prop in NumField
. #165initialValue
. #164ValidatedForm
. #161import connectField from 'uniforms'
. #129label
in GraphQLBridge
.SelectField
in semantic theme.SelectField
in unstyled theme.modelTransform
prop in BaseForm
. #123connectField
have now different displayName
to match forms inheritance.defaultValue
in SimpleSchema2Bridge
. #130invariant
and warning
dependencies.Bridge
cannot be instantiated.Bridge
constructor is now noop.Bridge
methods are now throwing an unimplemented method errors.showInlineError
prop in BaseForm
. #87showInlineError
prop in ListField
. #100showInlineError
prop in NestField
.ListAddField
and ListDelField
. #125process.addListener
is not a function in some environments. #124showInlineError
prop in semantic theme.FormGroup
helper component.grid
handling.ListAddField
styling. #121connectField
are now stored on fields instances.babel-runtime
to minify build size.BaseForm
.ListField
.SimpleSchema2Bridge
. #107ValidatedForm
validates with the old model. #104NumberField
does not seem to let me enter "0" as the number. #101SubmitField
doesn't allow you to set value. #95AutoFields
component is not exported. #31ListField
in ListField
. #91showInlineError
prop in bootstrap theme. #84onSubmitSuccess
and onSubmitFailure
props on forms. #51invariant
package.filterDOMProps
helper.autosaveDelay
prop on forms. #29icon
and iconLeft
prop in semantic theme. #67inputRef
prop on every field. #68ModifierForm
example. #66ListField
in bootstrap theme. #72findError
.itemProps
prop on ListField
. #60injectName
helper.joinName
works with dots in parts.propTypes
.HiddenField
leads to infinite loop. #63NestField
leads to infinite loop. #62HiddenField
. #53onChangeModel
prop on AutoForm
.value
prop. #52ErrorField
styling in semantic theme. #55labelLeft
prop in bootstrap themes. #36AutoFields
. #31autoField
, errorsField
or submitField
props on QuickForm
. #28SelectField
checkbox mode. #33type
to fieldType
. #32TextField
regression. #30transform
prop on RadioField
. #27.id
generation.type
prop on TextField
. #19id
.CONTRIBUTING.md
. #20ListField
styling in bootstrap themes. #16onSubmit
until render. #15initialCount
can be passed to the ListField
directly. #14ErrorField
. #13changed
. #12initialCount
works with arrays. #14autosave
prop on forms. #11errorMessage
. #6getErrorMessage(name, error)
method. #6component
prop on AutoField
.explicitDefaultValue
to explicitInitialValue
.includeDefault
to initialValue
.findError
. #8findField
. #8findValue
. #8