Skip to content

Releases: qiniu/formstate-x

v2.0.0-beta.2

12 May 08:08
Compare
Choose a tag to compare
v2.0.0-beta.2 Pre-release
Pre-release

#36 optimize recursive type definition
#41 add ownError & hasOwnError for form state
#46 update Github Action config

v2.0.0-beta.1

07 Dec 09:34
c746613
Compare
Choose a tag to compare
v2.0.0-beta.1 Pre-release
Pre-release

#34 MobX 6.x support

v1.2.0

02 Jul 11:19
886634d
Compare
Choose a tag to compare

#28 Provide adapter for formstate

formstate adapter

This module provides a formstate adapter, with which you can use formstate state in formstate-x FormState like this:

import * as fs from 'formstate'
import { FormState } from 'formstate-x'

// the adapt method
import { xify } from 'formstate-x/esm/adapter'

// formstate FieldState or FormState
const stateA = new fs.FieldState(1)
const stateB = new fs.FormState({ ... })

// formstate-x FormState
const formState = new FormState({
  a: xify(state),
  b: xify(stateB)
})

// you can use the form state as usual
console.log(formState.value)
const result = await formState.validate()

It is helpful when migrating your project from formstate to formstate-x. Instead of rewriting all your input / field components at once, you can do it one by one. The adapter makes it possible to use formstate-based input / field component in a formstate-x-based form / page component.

NOTE: FormStateLazy is not supported yet.

v1.1.0

12 Jun 06:30
Compare
Choose a tag to compare

#25 Provide error info along with hasError in return value of method validate

v1.0.10

20 Apr 03:20
0680aea
Compare
Choose a tag to compare

#23 Performance optimization for validate

v1.0.9

22 Feb 02:26
8225fcc
Compare
Choose a tag to compare

#14 Debug error in MobX strict-mode

v1.0.8

14 Feb 13:15
16b11a4
Compare
Choose a tag to compare

#13 debug debounce of FieldState

v1.0.7

13 Dec 09:12
9a05a63
Compare
Choose a tag to compare

#12 debug activate logic of field state

v1.0.6

13 Dec 09:13
a1ac6b4
Compare
Choose a tag to compare

#11 修复携带相同值的 onChange 触发后不能正确 validate 的 bug

v1.0.5

27 Nov 02:28
9a0b02a
Compare
Choose a tag to compare

#10 Revert disableValidationWhen behavior of FormState