Fixed filter defaults and removed auto-migrate.

This commit is contained in:
orangemug 2020-02-09 16:33:47 +00:00
parent b539644b2b
commit 109261ba00

View file

@ -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]) => {