Commit 20967006 authored by Sonja Happ's avatar Sonja Happ

use ButtonToolbar to place run button next to drop down menu

parent 3aacba30
......@@ -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>;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment