mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
use ButtonToolbar to place run button next to drop down menu
This commit is contained in:
parent
3aacba30be
commit
20967006a4
1 changed files with 6 additions and 4 deletions
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { Button, DropdownButton, DropdownItem } from 'react-bootstrap';
|
||||
import { Button, ButtonToolbar, DropdownButton, DropdownItem } from 'react-bootstrap';
|
||||
|
||||
class SimulatorAction extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -38,7 +38,7 @@ class SimulatorAction extends React.Component {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setAction = id => {
|
||||
// search action
|
||||
for (let action of this.props.actions) {
|
||||
|
@ -56,11 +56,13 @@ class SimulatorAction extends React.Component {
|
|||
));
|
||||
|
||||
return <div>
|
||||
<ButtonToolbar>
|
||||
<DropdownButton title={this.state.selectedAction != null ? this.state.selectedAction.title : ''} id="action-dropdown" onSelect={this.setAction}>
|
||||
{actionList}
|
||||
{actionList}
|
||||
</DropdownButton>
|
||||
|
||||
<Button style={{ marginLeft: '5px' }} disabled={this.props.runDisabled} onClick={() => this.props.runAction(this.state.selectedAction)}>Run</Button>
|
||||
</ButtonToolbar>
|
||||
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue