mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge pull request #2292 from mozilla/PLT-2064
PLT-2064 Slash command hints don't autocomplete
This commit is contained in:
@@ -18,7 +18,7 @@ class CommandSuggestion extends React.Component {
|
||||
onClick={onClick}
|
||||
>
|
||||
<div className='command__title'>
|
||||
<string>{item.suggestion}</string>
|
||||
<string>{item.suggestion} {item.hint}</string>
|
||||
</div>
|
||||
<div className='command__desc'>
|
||||
{item.description}
|
||||
|
||||
@@ -787,11 +787,13 @@ export function getSuggestedCommands(command, suggestionId, component) {
|
||||
data.forEach((cmd) => {
|
||||
if (('/' + cmd.trigger).indexOf(command) === 0) {
|
||||
let s = '/' + cmd.trigger;
|
||||
let hint = '';
|
||||
if (cmd.auto_complete_hint && cmd.auto_complete_hint.length !== 0) {
|
||||
s += ' ' + cmd.auto_complete_hint;
|
||||
hint = cmd.auto_complete_hint;
|
||||
}
|
||||
matches.push({
|
||||
suggestion: s,
|
||||
hint,
|
||||
description: cmd.auto_complete_desc
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user