Browse Source

fix EditableItem check not trigger props onChange (#3092)

Dr_rOot 7 years atrás
parent
commit
3bece1fc73
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/components/EditableItem/index.js

+ 1 - 1
src/components/EditableItem/index.js

@@ -19,7 +19,7 @@ export default class EditableItem extends PureComponent {
   check = () => {
     this.setState({ editable: false });
     const { value } = this.state;
-    const { onChange } = this.state;
+    const { onChange } = this.props;
     if (onChange) {
       onChange(value);
     }