diff --git a/.eslintrc.js b/.eslintrc.js index 83bd0fc33e..97e9d90b42 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -104,6 +104,7 @@ if (process.env.RUN_ENV === 'DEMO') { 'react/no-multi-comp': 0, 'jsx-a11y/href-no-hash': 0, 'import/no-extraneous-dependencies': 0, + 'jsx-a11y/control-has-associated-label': 0, }); } diff --git a/components/form/demo/customized-form-controls.md b/components/form/demo/customized-form-controls.md index 8063c8fec9..2f438b87d1 100644 --- a/components/form/demo/customized-form-controls.md +++ b/components/form/demo/customized-form-controls.md @@ -73,24 +73,27 @@ class PriceInput extends React.Component { // Should provide an event to pass value to Form. const { onChange } = this.props; if (onChange) { - onChange(Object.assign({}, this.state, changedValue)); + onChange({ + ...this.state, + ...changedValue, + }); } }; render() { const { size } = this.props; - const { state } = this; + const { currency, number } = this.state; return (