summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/react/components/suggestion/at_mention_provider.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/react/components/suggestion/at_mention_provider.jsx b/web/react/components/suggestion/at_mention_provider.jsx
index 8c2893448..e502c981d 100644
--- a/web/react/components/suggestion/at_mention_provider.jsx
+++ b/web/react/components/suggestion/at_mention_provider.jsx
@@ -5,6 +5,8 @@ import SuggestionStore from '../../stores/suggestion_store.jsx';
import UserStore from '../../stores/user_store.jsx';
import * as Utils from '../../utils/utils.jsx';
+const MaxUserSuggestions = 40;
+
class AtMentionSuggestion extends React.Component {
render() {
const {item, isSelection, onClick} = this.props;
@@ -78,6 +80,10 @@ export default class AtMentionProvider {
if (user.username.startsWith(usernamePrefix)) {
filtered.push(user);
}
+
+ if (filtered.length >= MaxUserSuggestions) {
+ break;
+ }
}
// add dummy users to represent the @all and @channel special mentions