about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components/autosuggest_input.js
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-04-11 17:59:38 +0200
committerThibG <thib@sitedethib.com>2019-04-26 22:38:03 +0200
commitd7e4be285abfacfbf7ea6c50d2e2090128ef9b5d (patch)
tree320a14e9308cf9ef2deb1a3198beee7ec3c8379a /app/javascript/flavours/glitch/components/autosuggest_input.js
parentdf52004fe6de0a8f21e97967f9d9d8a5fc945465 (diff)
Add emoji suggestion to poll options
Diffstat (limited to 'app/javascript/flavours/glitch/components/autosuggest_input.js')
-rw-r--r--app/javascript/flavours/glitch/components/autosuggest_input.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/autosuggest_input.js b/app/javascript/flavours/glitch/components/autosuggest_input.js
index 7de9f2307..4797767b0 100644
--- a/app/javascript/flavours/glitch/components/autosuggest_input.js
+++ b/app/javascript/flavours/glitch/components/autosuggest_input.js
@@ -50,6 +50,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
     className: PropTypes.string,
     id: PropTypes.string,
     searchTokens: PropTypes.list,
+    maxLength: PropTypes.number,
   };
 
   static defaultProps = {
@@ -185,7 +186,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
   }
 
   render () {
-    const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id } = this.props;
+    const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength } = this.props;
     const { suggestionsHidden } = this.state;
     const style = { direction: 'ltr' };
 
@@ -214,6 +215,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
             aria-autocomplete='list'
             id={id}
             className={className}
+            maxLength={maxLength}
           />
         </label>