Allow setting many comma separated values

This commit is contained in:
Lukas Martinelli
2016-12-19 15:09:03 +01:00
parent 3c3f396937
commit 4028c660fc
2 changed files with 5 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ class ZoomSpecField extends React.Component {
return <div style={{
border: 1,
borderStyle: 'solid',
borderColor: color(theme.colors.gray).lighten(0.1).hexString(),
borderColor: color(theme.colors.gray).lighten(0.1).string(),
padding: theme.scale[1],
}}>
{zoomFields}

View File

@@ -7,6 +7,7 @@ import inputStyle from '../fields/input.js'
import theme from '../theme.js'
const combiningFilterOps = ['all', 'any', 'none']
const setFilterOps = ['in', '!in']
const otherFilterOps = Object
.keys(GlSpec.filter_operator.values)
.filter(op => combiningFilterOps.indexOf(op) < 0)
@@ -106,8 +107,9 @@ class SingleFilterEditor extends React.Component {
width: '53%',
margin: theme.scale[0]
}}
value={filterArgs}
onChange={newFilterArgs => this.onFilterPartChanged(filterOp, propertyName, newFilterArgs)}
value={filterArgs.join(',')}
onChange={e => {
this.onFilterPartChanged(filterOp, propertyName, e.target.value.split(','))}}
/>
</div>
}