MCPcopy
hub / github.com/react-component/form / componentWillMount

Function componentWillMount

tests/getFieldDecorator.spec.js:10–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8describe('getFieldDecorator', () => {
9 class Test extends React.Component {
10 componentWillMount() {
11 const { getFieldDecorator } = this.props.form;
12 this.normalInput = getFieldDecorator('normal');
13 this.requiredInput = getFieldDecorator('required', {
14 rules: [{
15 required: true,
16 }],
17 });
18 this.blurRequiredInput = getFieldDecorator('blurRequired', {
19 validate: [{
20 trigger: 'onBlur',
21 rules: [{
22 required: true,
23 }],
24 }],
25 });
26 }
27 render() {
28 return (<div>
29 {this.normalInput(

Callers

nothing calls this directly

Calls 1

getFieldDecoratorFunction · 0.85

Tested by

no test coverage detected