mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
add-strategy list should be scrollable
This commit is contained in:
parent
da5d1e6156
commit
420bd99d1e
@ -30,10 +30,15 @@ class AddStrategy extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
const menuStyle = {
|
||||||
|
maxHeight: '300px',
|
||||||
|
overflowY: 'auto',
|
||||||
|
backgroundColor: 'rgb(247, 248, 255)',
|
||||||
|
};
|
||||||
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="strategies-add" colored title="Sort" onClick={this.stopPropagation}/>
|
<IconButton name="add" id="strategies-add" colored title="Sort" onClick={this.stopPropagation}/>
|
||||||
<Menu target="strategies-add" valign="bottom" align="right" ripple onClick={
|
<Menu target="strategies-add" valign="top" align="left" ripple style={menuStyle} 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