chore: remove the need for makeDirty in U.FormBuilder

This commit is contained in:
Yohan Boniface 2024-04-19 12:55:35 +02:00
parent 53f93ee97e
commit 9c326d09e1
3 changed files with 4 additions and 8 deletions

View file

@ -142,8 +142,7 @@ export default class Browser {
['options.filter', { handler: 'Input', placeholder: translate('Filter') }],
['options.inBbox', { handler: 'Switch', label: translate('Current map view') }],
]
const builder = new U.FormBuilder(this, fields, {
makeDirty: false,
const builder = new L.FormBuilder(this, fields, {
callback: () => this.onFormChange(),
})
formContainer.appendChild(builder.build())

View file

@ -103,8 +103,7 @@ export default class Facets {
]
})
const builder = new U.FormBuilder(this, fields, {
makeDirty: false,
const builder = new L.FormBuilder(this, fields, {
callback: filterFeatures,
callbackContext: this,
})

View file

@ -1117,10 +1117,8 @@ U.FormBuilder = L.FormBuilder.extend({
setter: function (field, value) {
L.FormBuilder.prototype.setter.call(this, field, value)
if (this.options.makeDirty !== false) {
this.obj.isDirty = true
if ('render' in this.obj) this.obj.render([field], this)
}
},
finish: function () {