Make default list item propable
This commit is contained in:
parent
646408eeaf
commit
ce85534e86
1 changed files with 3 additions and 1 deletions
|
|
@ -9,7 +9,9 @@ let SelectableList = SelectableContainerEnhance(List)
|
|||
function wrapState(ComposedComponent) {
|
||||
const StateWrapper = React.createClass({
|
||||
getInitialState() {
|
||||
if(typeof this.props.initialIndex == 'undefined')
|
||||
return {selectedIndex: -1};
|
||||
return {selectedIndex: this.props.initialIndex};
|
||||
},
|
||||
setIndex(i, func){
|
||||
this.setState({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue