Fix non existing value warning

This commit is contained in:
Lukas Martinelli 2017-01-09 23:02:17 +01:00
parent cff0a15f7e
commit f806e797fa
2 changed files with 2 additions and 1 deletions

View file

@ -70,6 +70,7 @@ export default class SpecField extends React.Component {
if(options.length <= 3 && optionsLabelLength(options) <= 20) { if(options.length <= 3 && optionsLabelLength(options) <= 20) {
return <MultiButtonInput return <MultiButtonInput
{...commonProps} {...commonProps}
value={this.props.value || this.props.fieldSpec.default}
options={options} options={options}
/> />
} else { } else {

View file

@ -30,7 +30,7 @@ function hasNestedCombiningFilter(filter) {
export default class CombiningFilterEditor extends React.Component { export default class CombiningFilterEditor extends React.Component {
static propTypes = { static propTypes = {
/** Properties of the vector layer and the available fields */ /** Properties of the vector layer and the available fields */
properties: React.PropTypes.object.isRequired, properties: React.PropTypes.object,
filter: React.PropTypes.array, filter: React.PropTypes.array,
onChange: React.PropTypes.func.isRequired, onChange: React.PropTypes.func.isRequired,
} }