diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-01-29 19:45:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 01:45:35 +0100 |
commit | c49213f0ea311daba590db1d7a14a641cbd9fe93 (patch) | |
tree | 4a6bbb162b1fa906c2d3737caa4871e2b6bf5b76 /app/javascript/mastodon/components/autosuggest_textarea.js | |
parent | b58bf74e35039a29ca3794ea100a19d4d07cc810 (diff) |
Upgrade ESlint to v8 (#23305)
Diffstat (limited to 'app/javascript/mastodon/components/autosuggest_textarea.js')
-rw-r--r-- | app/javascript/mastodon/components/autosuggest_textarea.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/javascript/mastodon/components/autosuggest_textarea.js b/app/javascript/mastodon/components/autosuggest_textarea.js index b6c590916..c04491298 100644 --- a/app/javascript/mastodon/components/autosuggest_textarea.js +++ b/app/javascript/mastodon/components/autosuggest_textarea.js @@ -75,7 +75,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { } this.props.onChange(e); - } + }; onKeyDown = (e) => { const { suggestions, disabled } = this.props; @@ -133,25 +133,25 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { } this.props.onKeyDown(e); - } + }; onBlur = () => { this.setState({ suggestionsHidden: true, focused: false }); - } + }; onFocus = (e) => { this.setState({ focused: true }); if (this.props.onFocus) { this.props.onFocus(e); } - } + }; onSuggestionClick = (e) => { const suggestion = this.props.suggestions.get(e.currentTarget.getAttribute('data-index')); e.preventDefault(); this.props.onSuggestionSelected(this.state.tokenStart, this.state.lastToken, suggestion); this.textarea.focus(); - } + }; componentWillReceiveProps (nextProps) { if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) { @@ -161,14 +161,14 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { setTextarea = (c) => { this.textarea = c; - } + }; onPaste = (e) => { if (e.clipboardData && e.clipboardData.files.length === 1) { this.props.onPaste(e.clipboardData.files); e.preventDefault(); } - } + }; renderSuggestion = (suggestion, i) => { const { selectedSuggestion } = this.state; @@ -190,7 +190,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { {inner} </div> ); - } + }; render () { const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, lang, children } = this.props; |