All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and adheres to Semantic Versioning.
- Fixed babel helpers file being generated with incorrect filename in esm build. [#2082]
- Migrate from
sewing-kit-next
toloom
for building - package build output remains identical. [#2039]
- Enable type checking in tests and fix type errors. [#2011]
- Added file exclusion for tests to package.json. [#2005]
- Updated build tooling, types are now compiled with TypeScript 4.3. [#1997]
- Ensure
tsconfig.tsbuildinfo
file is not uploaded to the npm registry. [#1982]
- Update to latest sewing-kit-next for build. Update
types
/typesVersions
fields to point directly into the build folder [#1980]
- Officially supports React
17.x
1969
- No updates. Transitive dependency bump.
- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. #1906
- [Patch] Remove TypeScript type from distributed mjs #1845
- Removed dependency on tslib, as we no-longer compile with
tsc
. #1829
- Updated multi-build outputs to include mandatory extensions to fix "Module not found" issues reported by ESM supported bundlers #1759
- Add new build outputs (CommonJS, ESM, esnext, Node) for greater tree-shakability #1698
- Updated
fast-deep-equal
dependency to^3.1.3
#1710
- Export
StringMapper
interface #1655
- Updated
tslib
dependency to^1.14.1
. #1657
- new
asChoiceField
utility function to supportCheckbox
andRadioButton
#1070
- Fixed using multiple layers deep of nested
<List />
inside of<List />
- Extend the return type of the submit handler for
FormState
component to accept a promise of bothvoid
andRemoteError[]
. #736
- validator signatures produced by
validate()
no longer require afields
param. #714
FormState.Nested
no longer breaks when used in aFormState.List
and an item is added #698
- when
validateOnSubmit
is enabled, validation errors are surfaced on the form'serrors
. #601
isNumeric
function ReGex now matches for negative numbers. This impacts users ofisNumericString
validator function relying on its previous behaviour of only allowing positive numbers. To reintroduce that behaviour please useisPostiveNumericString
<Nested />
and<List />
: removed logic inshouldComponentUpdate()
limiting updates
- You can now provide
externalErrors
to theFormState
component to be merged into the form'serror
objects.
- lodash is no longer used internally. #475
- Fixes validators for cases where
externalErrors
are not provided. #504
- You can now use the onInitialValueChanged prop with fields having nested properties. #464
submit
now checks for the existence ofpreventDefault
on the event passed in before calling it. #465
- You can control how
<FormState />
reacts to changes in the initialValue prop using onInitialValueChanged.
<List />
supportsgetChildKey
to provide customkey
s for it's children. #387
<List />
no longer breaks on name generation.
- The
validateRequired
helper can be used to generate validators that run even on empty input.
- Validators that depend on
FieldState
have more robust typing.
- When validators fail during a submit submitting is reset to false.
- The
validateOnSubmit
prop can be used to have validators run before theonSubmit
function is called and will preventonSubmit
from being called if any fail.
- Fixed using multiple layers deep of Nested and List breaking the state.
- No longer accidentally import all of lodash.
- Validators based on
validate
now always succeed for an empty input. Therequired
andrequiredString
validators continue to behave the same way they used to.
- Fixed Nested and List component race condition. Nested and List now pass a function to their
onChange
prop instead of an object so that the data object will be created withinsetState
.