FormKit 1.5.0 ships with a new development build of FormKit. In development FormKit now uses slightly different versions of its packages that include additional developer experience enhancements. This is similar to how Vue itself has "development" and "production" versions, and it allows FormKit to provide an improved developer experience such as improved HMR support and better error messages.
The groundwork is now laid for greatly improved developer experience in future releases. This release also includes dozens of bug fixes and improvements.
💪 New features
- Adds a new API for adding props to inputs with default values, boolean props, and getters/setters. See the updated docs for more info.
createInput
now supports a third argument, sectionsSchema which allows you to extend the default sections that come withcreateInput
(#882).- Adds new context property
didMount
and node eventmounted
to recognize when the<FormKit>
component is mounted to the DOM (#0b8753d). - Now
node.children
are observed by@formkit/observer
, this allows validation rules to accessnode.children
with reactivity. - Hot module replacement with Vite/Nuxt now preserve the form state when updating form code (#1068)
- Adds new
changeLocale
composable that globally changes the locale of all forms with Options API, Composition API, and Nuxt autoimport (#1112) - Rules
allow_non_alpha
andallow_numeric
. - The new FormKit cli now scaffolds new apps (
npx formkit create-app
) to use themes.formkit.com’s theme system. - New development build of FormKit that includes additional developer experience enhancements.
🐛 Bug fixes
- Fixes Vite TSDoc comment warnings - by Yue Yang (e47c9)
- Fix windows create-app name for nuxt projects (1066)
- Inputs that use
options
(select, checkbox, radio, autocomplete etc) now properly count their__mask
value (#1046). - Fixes a bug that did now allow submitAttrs to disable submit input (#789).
- Removes data-disabled on checkbox and radio inputs when false - (#1043).
- Fixes autoAnimate when used on repeaters and other inputs with complex conditionals (#1016).
- Significantly improves
@formkit/nuxt
’s experimentalautoImport
feature (1095, and others). - Autoheight textarea hydration in nuxt (#980).
- Adds non-blocking messages in getValidationMessages (#849).
node.clearErrors()
always removes errors local to that node (#941)- Reduces re-renders on destructured group values (#1068).
- Removes warning on multi-step about default slot being called outside render function (#920).
- Inputs inside a disabled repeater can be enabled per-input (#1043).
- Improves typing for
createInput()
(#1105). - Removes
data-complete
on groups/lists (#1038). - Boolean props like disabled and preserve can now be used without explicitly setting them to
true
orfalse
(#989).
Important
Vitest does not automatically use the same node parameters (conditions) that Vite does (see #4971). If you find your tests failing after you update, you can add the following to your vitest.config.js
file: