From a8e37500dda6c808b71f6eb0a21f05b4939eed30 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 15 Feb 2024 11:16:13 +0100 Subject: [PATCH] fix: reset table editor properties after creating a new one --- umap/static/umap/js/umap.tableeditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.tableeditor.js b/umap/static/umap/js/umap.tableeditor.js index 4a664705..19cafbed 100644 --- a/umap/static/umap/js/umap.tableeditor.js +++ b/umap/static/umap/js/umap.tableeditor.js @@ -46,7 +46,6 @@ U.TableEditor = L.Class.extend({ }) this.datalayer.deindexProperty(property) this.datalayer.indexProperty(newName) - this.resetProperties() this.edit() } L.DomEvent.on(del, 'click', doDelete, this) @@ -63,6 +62,7 @@ U.TableEditor = L.Class.extend({ }, compileProperties: function () { + this.resetProperties() 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 if (this.properties.indexOf('description') !== -1)