From 7ead702e39125bf10650175544aace37d8d041dc Mon Sep 17 00:00:00 2001 From: Alan Mooiman Date: Mon, 29 Feb 2016 15:49:10 -0800 Subject: PLT-2064 Slash command hints don't autocomplete --- web/react/components/suggestion/command_provider.jsx | 2 +- web/react/utils/async_client.jsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/react/components/suggestion/command_provider.jsx b/web/react/components/suggestion/command_provider.jsx index 09c9b9982..21d6d0e0e 100644 --- a/web/react/components/suggestion/command_provider.jsx +++ b/web/react/components/suggestion/command_provider.jsx @@ -18,7 +18,7 @@ class CommandSuggestion extends React.Component { onClick={onClick} >
- {item.suggestion} + {item.suggestion} {item.hint}
{item.description} diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx index 13b57092d..ca9d81865 100644 --- a/web/react/utils/async_client.jsx +++ b/web/react/utils/async_client.jsx @@ -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 }); } -- cgit v1.2.3-1-g7c22