mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-24 01:18:01 +02:00
fix button action not affecting form
This commit is contained in:
parent
ca40eedb32
commit
63d60c354e
@ -24,11 +24,16 @@ class AddStrategy extends React.Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
stopPropagation (e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<div style={{ position: 'relative', width: '25px', height: '25px', display: 'inline-block' }} >
|
<div style={{ position: 'relative', width: '25px', height: '25px', display: 'inline-block' }} >
|
||||||
<IconButton name="add" id="demo-menu-top-right" colored title="Sort" />
|
<IconButton name="add" id="strategies-add" colored title="Sort" onClick={this.stopPropagation}/>
|
||||||
<Menu target="demo-menu-top-right" valign="bottom" align="center" ripple onClick={
|
<Menu target="strategies-add" valign="bottom" align="left" ripple onClick={
|
||||||
(e) => this.setSort(e.target.getAttribute('data-target'))}>
|
(e) => this.setSort(e.target.getAttribute('data-target'))}>
|
||||||
<MenuItem disabled>Add Strategy:</MenuItem>
|
<MenuItem disabled>Add Strategy:</MenuItem>
|
||||||
{this.props.strategies.map((s) => <MenuItem key={s.name} onClick={() => this.addStrategy(s.name)}>{s.name}</MenuItem>)}
|
{this.props.strategies.map((s) => <MenuItem key={s.name} onClick={() => this.addStrategy(s.name)}>{s.name}</MenuItem>)}
|
||||||
|
Loading…
Reference in New Issue
Block a user