mirror of
https://github.com/maputnik/editor.git
synced 2026-08-25 06:27:25 +00:00
Nicer action on item list
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user