chore: remove the need for makeDirty in U.FormBuilder
This commit is contained in:
parent
53f93ee97e
commit
9c326d09e1
3 changed files with 4 additions and 8 deletions
|
@ -142,8 +142,7 @@ export default class Browser {
|
||||||
['options.filter', { handler: 'Input', placeholder: translate('Filter') }],
|
['options.filter', { handler: 'Input', placeholder: translate('Filter') }],
|
||||||
['options.inBbox', { handler: 'Switch', label: translate('Current map view') }],
|
['options.inBbox', { handler: 'Switch', label: translate('Current map view') }],
|
||||||
]
|
]
|
||||||
const builder = new U.FormBuilder(this, fields, {
|
const builder = new L.FormBuilder(this, fields, {
|
||||||
makeDirty: false,
|
|
||||||
callback: () => this.onFormChange(),
|
callback: () => this.onFormChange(),
|
||||||
})
|
})
|
||||||
formContainer.appendChild(builder.build())
|
formContainer.appendChild(builder.build())
|
||||||
|
|
|
@ -103,8 +103,7 @@ export default class Facets {
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const builder = new U.FormBuilder(this, fields, {
|
const builder = new L.FormBuilder(this, fields, {
|
||||||
makeDirty: false,
|
|
||||||
callback: filterFeatures,
|
callback: filterFeatures,
|
||||||
callbackContext: this,
|
callbackContext: this,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1117,10 +1117,8 @@ U.FormBuilder = L.FormBuilder.extend({
|
||||||
|
|
||||||
setter: function (field, value) {
|
setter: function (field, value) {
|
||||||
L.FormBuilder.prototype.setter.call(this, field, value)
|
L.FormBuilder.prototype.setter.call(this, field, value)
|
||||||
if (this.options.makeDirty !== false) {
|
|
||||||
this.obj.isDirty = true
|
this.obj.isDirty = true
|
||||||
if ('render' in this.obj) this.obj.render([field], this)
|
if ('render' in this.obj) this.obj.render([field], this)
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
finish: function () {
|
finish: function () {
|
||||||
|
|
Loading…
Reference in a new issue