2016-12-29 14:44:46 +01:00
|
|
|
import React from 'react'
|
|
|
|
|
|
|
|
import InputBlock from '../inputs/InputBlock'
|
|
|
|
import StringInput from '../inputs/StringInput'
|
|
|
|
import SelectInput from '../inputs/SelectInput'
|
2016-12-30 20:38:50 +01:00
|
|
|
import AutocompleteInput from '../inputs/AutocompleteInput'
|
2016-12-29 14:44:46 +01:00
|
|
|
|
|
|
|
class LayerSourceLayer extends React.Component {
|
|
|
|
static propTypes = {
|
2016-12-31 10:39:30 +01:00
|
|
|
value: React.PropTypes.string,
|
|
|
|
onChange: React.PropTypes.func,
|
|
|
|
sourceLayerIds: React.PropTypes.array,
|
|
|
|
}
|
|
|
|
|
|
|
|
static defaultProps = {
|
|
|
|
onChange: () => {},
|
|
|
|
sourceLayerIds: [],
|
2016-12-29 14:44:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return <InputBlock label={"Source Layer"}>
|
2016-12-30 20:38:50 +01:00
|
|
|
<AutocompleteInput
|
2016-12-29 14:44:46 +01:00
|
|
|
value={this.props.value}
|
|
|
|
onChange={this.props.onChange}
|
|
|
|
options={this.props.sourceLayerIds.map(l => [l, l])}
|
2016-12-31 14:02:14 +01:00
|
|
|
wrapperStyle={{ width: '50%' }}
|
2016-12-29 14:44:46 +01:00
|
|
|
/>
|
|
|
|
</InputBlock>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default LayerSourceLayer
|