Skip to content

Migrate to 0.15 ​

0.15 reads definition format 1.2, which adds props on fields. Five runtime changes can change submitted values.

bash
npm i @formhaus/core@^0.15 @formhaus/react@^0.15
npm i @formhaus/core@^0.15 @formhaus/vue@^0.15

Changes ​

AreaOld (0.14)New (0.15)Action
ValuesA field that started hidden, or was hidden and shown again, came back empty, except a hidden fieldA field shown again gets back its last value. A field without one, such as a field that starts hidden, gets its initial value or defaultValueRemove workarounds that restore values or set defaults after a field appears
GroupsA group shown again started with defaultItems new itemsIt gets back its last items, or else its initial itemsNone
GroupsAn item in the initial values or in reset(values) kept item fields it left out emptyIt gets their defaultValue, like top-level fieldsDrop item defaults that the app fills itself
ServervalidateSubmission() filled the defaultValue of a key missing from the payloadA missing key stays missingMake sure the client sends every field it wants saved
ValuesA cleared number input wrote ''It writes nullTreat null as a cleared number on the server
FormatFORMAT_VERSION was "1.1""1.2"Set "formatVersion": "1.2" on definitions with props
TypesEvery node in FormNode and FormSection.fields had a labelA hidden field is a HiddenFormField whose label is optionalCode that passes these nodes where a FormField is expected may need a type check for type === 'hidden'