fix: reset table editor properties after creating a new one

This commit is contained in:
Yohan Boniface 2024-02-15 11:16:13 +01:00
parent a3d1655041
commit a8e37500dd

View file

@ -46,7 +46,6 @@ U.TableEditor = L.Class.extend({
}) })
this.datalayer.deindexProperty(property) this.datalayer.deindexProperty(property)
this.datalayer.indexProperty(newName) this.datalayer.indexProperty(newName)
this.resetProperties()
this.edit() this.edit()
} }
L.DomEvent.on(del, 'click', doDelete, this) L.DomEvent.on(del, 'click', doDelete, this)
@ -63,6 +62,7 @@ U.TableEditor = L.Class.extend({
}, },
compileProperties: function () { compileProperties: function () {
this.resetProperties()
if (this.properties.length === 0) this.properties = ['name'] if (this.properties.length === 0) this.properties = ['name']
// description is a forced textarea, don't edit it in a text input, or you lose cariage returns // description is a forced textarea, don't edit it in a text input, or you lose cariage returns
if (this.properties.indexOf('description') !== -1) if (this.properties.indexOf('description') !== -1)