Nicer action on item list

This commit is contained in:
Lukas Martinelli
2016-12-20 19:20:56 +01:00
parent 6a129fcf3f
commit 6d9484ec5e
6 changed files with 141 additions and 41 deletions
+2
View File
@@ -15,6 +15,7 @@ import {SortableContainer, SortableHandle, arrayMove} from 'react-sortable-hoc';
const layerListPropTypes = {
layers: React.PropTypes.array.isRequired,
selectedLayerIndex: React.PropTypes.number.isRequired,
onLayersChanged: React.PropTypes.func.isRequired,
onLayerSelected: React.PropTypes.func,
}
@@ -45,6 +46,7 @@ class LayerListContainer extends React.Component {
key={layerId}
layerId={layerId}
layerType={layer.type}
isSelected={index === this.props.selectedLayerIndex}
onLayerSelected={this.props.onLayerSelected}
/>
})