Explorar o código

fix tagselect bug

jim %!s(int64=8) %!d(string=hai) anos
pai
achega
86b9ac0bd8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/components/TagSelect/index.js

+ 2 - 1
src/components/TagSelect/index.js

@@ -17,8 +17,9 @@ TagSelectOption.isTagSelectOption = true;
 class TagSelect extends Component {
   static getDerivedStateFromProps(nextProps) {
     if ('value' in nextProps && nextProps.value) {
-      this.setState({ value: nextProps.value });
+      return { value: nextProps.value };
     }
+    return null;
   }
 
   state = {