mirror of
https://github.com/maputnik/editor.git
synced 2026-08-25 22:47:39 +00:00
Allow setting many comma separated values
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ class ZoomSpecField extends React.Component {
|
|||||||
return <div style={{
|
return <div style={{
|
||||||
border: 1,
|
border: 1,
|
||||||
borderStyle: 'solid',
|
borderStyle: 'solid',
|
||||||
borderColor: color(theme.colors.gray).lighten(0.1).hexString(),
|
borderColor: color(theme.colors.gray).lighten(0.1).string(),
|
||||||
padding: theme.scale[1],
|
padding: theme.scale[1],
|
||||||
}}>
|
}}>
|
||||||
{zoomFields}
|
{zoomFields}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import inputStyle from '../fields/input.js'
|
|||||||
import theme from '../theme.js'
|
import theme from '../theme.js'
|
||||||
|
|
||||||
const combiningFilterOps = ['all', 'any', 'none']
|
const combiningFilterOps = ['all', 'any', 'none']
|
||||||
|
const setFilterOps = ['in', '!in']
|
||||||
const otherFilterOps = Object
|
const otherFilterOps = Object
|
||||||
.keys(GlSpec.filter_operator.values)
|
.keys(GlSpec.filter_operator.values)
|
||||||
.filter(op => combiningFilterOps.indexOf(op) < 0)
|
.filter(op => combiningFilterOps.indexOf(op) < 0)
|
||||||
@@ -106,8 +107,9 @@ class SingleFilterEditor extends React.Component {
|
|||||||
width: '53%',
|
width: '53%',
|
||||||
margin: theme.scale[0]
|
margin: theme.scale[0]
|
||||||
}}
|
}}
|
||||||
value={filterArgs}
|
value={filterArgs.join(',')}
|
||||||
onChange={newFilterArgs => this.onFilterPartChanged(filterOp, propertyName, newFilterArgs)}
|
onChange={e => {
|
||||||
|
this.onFilterPartChanged(filterOp, propertyName, e.target.value.split(','))}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user