Closed nighca closed 3 years ago
mark: 需要补充下较复杂的列表校验场景的实现示例,如
所以现在 ArrayFormState 的 fields 想做增、删、更换位置等操作的时候 推荐的做法是?
@lzfee0227 我倾向是暂时跟之前一样,不用特意去用 set
;在 #40 之后可能推荐的做法会调整
补充 case:
const form = new ArrayFormState([1, 2], initValue => { // + index ?
const field = new FieldState(initValue)
field.validators(value => {
form.$.find(field)
})
return field
})
FormState
->FormState
&ArrayFormState
FormState
&ArrayFormState
now provideset()
, fix #19dirty
&reset
behavior forFormState
&ArrayFormState
, fix #31isFormState
to check if a validatable instance is form stateNow we can code like this: