mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:11:17 +01:00
Fixed filter defaults and removed auto-migrate.
This commit is contained in:
parent
b539644b2b
commit
109261ba00
1 changed files with 4 additions and 7 deletions
|
@ -84,6 +84,10 @@ export default class CombiningFilterEditor extends React.Component {
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static defaultProps = {
|
||||||
|
filter: ["all"],
|
||||||
|
}
|
||||||
|
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
super();
|
super();
|
||||||
this.state = {
|
this.state = {
|
||||||
|
@ -256,13 +260,6 @@ export default class CombiningFilterEditor extends React.Component {
|
||||||
else {
|
else {
|
||||||
let {filter} = this.props;
|
let {filter} = this.props;
|
||||||
|
|
||||||
if (!filter) {
|
|
||||||
filter = defaultFilter;
|
|
||||||
}
|
|
||||||
else if (isNestedCombiningFilter) {
|
|
||||||
filter = migrateFilter(filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
const errorMessage = Object.entries(errors)
|
const errorMessage = Object.entries(errors)
|
||||||
.filter(([k, v]) => k.match(/filter(\[\d+\])?/))
|
.filter(([k, v]) => k.match(/filter(\[\d+\])?/))
|
||||||
.map(([k, v]) => {
|
.map(([k, v]) => {
|
||||||
|
|
Loading…
Reference in a new issue