diff options
Diffstat (limited to 'src/console/components')
-rw-r--r-- | src/console/components/console/completion.jsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/console/components/console/completion.jsx b/src/console/components/console/completion.jsx index c60543b..5f128d7 100644 --- a/src/console/components/console/completion.jsx +++ b/src/console/components/console/completion.jsx @@ -27,19 +27,17 @@ const CompletionItem = (props) => { class CompletionComponent extends Component { render() { let eles = []; + let index = 0; for (let i = 0; i < this.props.completions.length; ++i) { let group = this.props.completions[i]; eles.push(<CompletionTitle title={ group.name }/>); - for (let j = 0; j < group.items.length; ++j) { + for (let j = 0; j < group.items.length; ++j, ++index) { let item = group.items[j]; - let selected = - i === this.props.groupSelection && - j === this.props.itemSelection; eles.push(<CompletionItem icon={item.icon} caption={item.caption} url={item.url} - highlight={selected} + highlight={index === this.props.select} / >); } } |