about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/autosuggest_textarea.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/components/autosuggest_textarea.js')
-rw-r--r--app/javascript/mastodon/components/autosuggest_textarea.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/app/javascript/mastodon/components/autosuggest_textarea.js b/app/javascript/mastodon/components/autosuggest_textarea.js
index 4d8f2882c..61e101f29 100644
--- a/app/javascript/mastodon/components/autosuggest_textarea.js
+++ b/app/javascript/mastodon/components/autosuggest_textarea.js
@@ -32,6 +32,25 @@ const textAtCursorMatchesToken = (str, caretPosition) => {
 
 class AutosuggestTextarea extends ImmutablePureComponent {
 
+  static propTypes = {
+    value: PropTypes.string,
+    suggestions: ImmutablePropTypes.list,
+    disabled: PropTypes.bool,
+    placeholder: PropTypes.string,
+    onSuggestionSelected: PropTypes.func.isRequired,
+    onSuggestionsClearRequested: PropTypes.func.isRequired,
+    onSuggestionsFetchRequested: PropTypes.func.isRequired,
+    onChange: PropTypes.func.isRequired,
+    onKeyUp: PropTypes.func,
+    onKeyDown: PropTypes.func,
+    onPaste: PropTypes.func.isRequired,
+    autoFocus: PropTypes.bool
+  };
+
+  static defaultProps = {
+    autoFucus: true
+  };
+
   constructor (props, context) {
     super(props, context);
     this.state = {
@@ -194,25 +213,6 @@ class AutosuggestTextarea extends ImmutablePureComponent {
     );
   }
 
-};
-
-AutosuggestTextarea.propTypes = {
-  value: PropTypes.string,
-  suggestions: ImmutablePropTypes.list,
-  disabled: PropTypes.bool,
-  placeholder: PropTypes.string,
-  onSuggestionSelected: PropTypes.func.isRequired,
-  onSuggestionsClearRequested: PropTypes.func.isRequired,
-  onSuggestionsFetchRequested: PropTypes.func.isRequired,
-  onChange: PropTypes.func.isRequired,
-  onKeyUp: PropTypes.func,
-  onKeyDown: PropTypes.func,
-  onPaste: PropTypes.func.isRequired,
-  autoFocus: PropTypes.bool
-};
-
-AutosuggestTextarea.defaultProps = {
-  autoFucus: true,
-};
+}
 
 export default AutosuggestTextarea;