form
form copied to clipboard
React High Order Form Component(web & react-native)
不生效,但是使用defaultValue可以 是不是文档没更新?
**https://github.com/react-component/form/blob/master/src/createBaseForm.js#L547** If we have array as a field value - we have an array in fieldErrors variables here, not an object with errors property. But string below expects errors property...
in rc-form , i have see ```setFields``` and ```setFieldsValue``` , i think there are similar this on ```props``` too , but i not found something like ```setFieldProps``` , i want...
 I just created a customized form control by function component with hooks. But find it will be not work. Maybe using Context API ranther than Ref API will be...
在使用 rc-form 时,我定义了一个剔除头尾空白的逻辑(用户输入过程中可以在尾部输入空白,然后继续输入其他有效内容,即空白可以出现中中间),同时这个逻辑可以避免用户输入全部是空白的无效内容。 ``` rules: [ {required: true, transform: value => String(value).trim() }, ], ``` 但是在 form.validateFields(err, value) 中拿到的值确实未经处理的,这个时候需要再做一次同样的处理逻辑(实际校验通过的内容,和提交时拿到的却是通不过校验的原始内容,不一致)。 建议 validateFields 时的结果值应该经过 transform 预处理。
Lifecycle methods like `componentWillReceiveProps` are going to be depreciated in the upcoming version of ReactJS, but these are still used in react-component. We are seeing their warnings in the console....
class components with Form Wrraped could get `this.form` but function components got undefined `function InsertForm1 ({ form }) { const formItemLayout = { labelCol: { span: 24 }, wrapperCol: {...
``` const { validateFields, getFieldError } = this.props.form; validateFields((error, value) => { console.log(error, value); if (error) { Toast.info(getFieldError(Object.keys(error)[0])); }; }); ``` 当前有两个输入框(mobile, code)都是必填,一进入页面的未编辑的时候打印 error: code, mobile value: mobile, code 编辑后或者第二次点击打印顺序一致mobile,...
 异步校验逻辑改动很大
Bumps [dom-scroll-into-view](https://github.com/yiminghe/dom-scroll-into-view) from 1.2.1 to 2.0.1. Changelog *Sourced from [dom-scroll-into-view's changelog](https://github.com/yiminghe/dom-scroll-into-view/blob/master/HISTORY.md).* > # History > ---- > > ## 2.0.0 / 2019-07-28 > > - use pack > > ##...