mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 06:16:01 +00:00
display better command listing on autotype
This commit is contained in:
parent
2209aab934
commit
06ac5315a5
@ -92,7 +92,7 @@ class Console extends Component {
|
|||||||
search={value}
|
search={value}
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
emptyLabel={false}
|
emptyLabel={false}
|
||||||
labelKey="name"
|
labelKey="value"
|
||||||
multiple={false}
|
multiple={false}
|
||||||
emptyLabel={false}
|
emptyLabel={false}
|
||||||
maxResults={10}
|
maxResults={10}
|
||||||
@ -108,12 +108,22 @@ class Console extends Component {
|
|||||||
}}
|
}}
|
||||||
onSearch={(value) => {
|
onSearch={(value) => {
|
||||||
console.dir(value);
|
console.dir(value);
|
||||||
this.setState({ isLoading: false, options: ['hello', 'dude', 'dude1'] })
|
this.setState({ isLoading: false, options: [{value: 'hello', command_type: "embark", description: "says hello back!"}, {value: 'SimpleStorage', command_type: "web3 object", description: ""}, {value: 'web3.eth.getAccounts', command_type: "web3", description: "get list of accounts"}] })
|
||||||
}}
|
}}
|
||||||
|
filterBy={['value']}
|
||||||
maxHeight="200px"
|
maxHeight="200px"
|
||||||
placeholder="Type a command (e.g help)"
|
placeholder="Type a command (e.g help)"
|
||||||
options={this.state.options}
|
options={this.state.options}
|
||||||
placeholder="Choose a state..."
|
placeholder="Choose a state..."
|
||||||
|
renderMenuItemChildren={(option) => (
|
||||||
|
<div>
|
||||||
|
{option.value}
|
||||||
|
<div>
|
||||||
|
<small>{option.command_type} - {option.description}</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</Card.Footer>}
|
</Card.Footer>}
|
||||||
</Card>
|
</Card>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user