Merge pull request #1963 from hmhealey/plt1670
PLT-1670 Added a limit to the number of suggestions when autocompleting at mentions
Этот коммит содержится в:
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user