diff options
author | Alan Mooiman <amooiman@gmail.com> | 2016-02-29 15:49:10 -0800 |
---|---|---|
committer | Alan Mooiman <amooiman@gmail.com> | 2016-02-29 15:59:33 -0800 |
commit | 7ead702e39125bf10650175544aace37d8d041dc (patch) | |
tree | 72d5208ff1616a72fdf45e68bba4c73373ef9983 | |
parent | 2f53edb2fde3e1fdcd1fd73d4bd9ec99be345273 (diff) | |
download | chat-7ead702e39125bf10650175544aace37d8d041dc.tar.gz chat-7ead702e39125bf10650175544aace37d8d041dc.tar.bz2 chat-7ead702e39125bf10650175544aace37d8d041dc.zip |
PLT-2064 Slash command hints don't autocomplete
-rw-r--r-- | web/react/components/suggestion/command_provider.jsx | 2 | ||||
-rw-r--r-- | web/react/utils/async_client.jsx | 4 |
2 files changed, 4 insertions, 2 deletions
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} > <div className='command__title'> - <string>{item.suggestion}</string> + <string>{item.suggestion} {item.hint}</string> </div> <div className='command__desc'> {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 }); } |