Explorar o código

bye this.typeahead.getInstance()

Shun Miyazawa %!s(int64=4) %!d(string=hai) anos
pai
achega
f94f53e731
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      packages/app/src/components/Page/TagsInput.jsx

+ 2 - 3
packages/app/src/components/Page/TagsInput.jsx

@@ -57,11 +57,10 @@ class TagsInput extends React.Component {
   handleSelect(e) {
     if (e.keyCode === 32) { // '32' means ASCII code of 'space'
       e.preventDefault();
-      const instance = this.typeahead.getInstance();
-      const { initialItem } = instance.state;
+      const { initialItem } = this.tagsInput.state;
 
       if (initialItem) {
-        instance._handleMenuItemSelect(initialItem, e);
+        this.tagsInput._handleMenuItemSelect(initialItem, e);
       }
     }
   }