[Bug Report] Attributes lost in Editor/CreateWorkFlow

341
0
06-23-2021 08:09 PM
Aiooioo
New Contributor

Hey, 

I just encounter some problem when using Editor widget for feature creation, and i think it can be a bug in CreateWorkFlow.js file. The problem is when i edit the attribute in featureForm, and then edit the geometry again on the map, all my attributes can be lost.

I notice that u copy the attributes to a same instance by mistake. The purpose must be sync the attributes from featureFormViewModel to sketchViewModel. 

a.viewModel.featureFormViewModel.on("value-change", () => {
a.edits.updateAttributes(
a.viewModel.featureFormViewModel.getValues()
);
b.attributes = a.edits.feature.attributes;
})

 

Please check.

0 Kudos
0 Replies