fix: always call propagate at end of save (#2226)

Otherwise the renderEditToolbar will reset name and all.

fix #2225
This commit is contained in:
Yohan Boniface 2024-10-21 16:40:01 +02:00 committed by GitHub
commit d2832be6d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1049,7 +1049,6 @@ U.Map = L.Map.extend({
return
}
this.options.user = data.user
this.renderEditToolbar()
if (!this.options.umap_id) {
this.options.umap_id = data.id
this.permissions.setOptions(data.permissions)
@ -1087,7 +1086,6 @@ U.Map = L.Map.extend({
} else {
window.location = data.url
}
this.propagate()
return true
},
@ -1106,7 +1104,10 @@ U.Map = L.Map.extend({
if (datalayer.isDirty) await datalayer.save()
}
this.isDirty = false
this.renderEditToolbar()
// Do a blind render for now, as we are not sure what could
// have changed, we'll be more subtil when we'll remove the
// save action
this.render(['name', 'user', 'permissions'])
this.fire('saved')
},