Selectable List in place
This commit is contained in:
@@ -7,13 +7,17 @@ class Row extends Component {
|
||||
children: PropTypes.node,
|
||||
minWidth: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
|
||||
width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
|
||||
fillParent: PropTypes.bool,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { children, width, minWidth } = this.props
|
||||
const { children, width, minWidth, fillParent } = this.props
|
||||
|
||||
return (
|
||||
<div style={{ height: '100%', display: 'flex', width, minWidth, flexDirection: 'row' }}>{children}</div>
|
||||
<div style={[
|
||||
{ display: 'flex', minWidth, width, flexDirection: 'row' },
|
||||
fillParent && { position: 'absolute', width: '100%', height: '100%' },
|
||||
]}>{children}</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -31,7 +35,9 @@ Row.Item = Radium(class RowLayoutItem extends Component {
|
||||
const flexGrow = grow ? 1 : null
|
||||
|
||||
return (
|
||||
<div style={{ width, minWidth, flexGrow }}>{children}</div>
|
||||
<div style={{ position: 'relative', width, minWidth, flexGrow }}>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user