Update. Until ESRI responds with a solution, I have this workaround. Please let me know if there are issues with this method. It was tested and it works as intended.
Workaround:
First create a global variable. I named it "creating" and set it to true.
Then, set the variable to false when the user completes the sketch of the new feature.
if (editorVM.state == 'creating-features' && editorVM.featureFormViewModel.feature && editorVM.featureFormViewModel.state == 'ready')
{ editorVM.sketchViewModel.on("update", function (event) {
if (editorVM.featureFormViewModel.state == "ready" && (editorVM.sketchViewModel.activeTool == "transform")) {
creating = false}
}
_ _ _ _ _ _
_ _ _ _ _ _
Then, prevent the creation of new features by disabling the click event. Allow only reshaping the feature prior submitting.
view.hitTest(event).then((response) => {
if (!creating) {
if (!(editorVM.sketchViewModel.activeTool == "reshape")) {
editorVM.sketchViewModel.cancel()
event.stopPropagation
return
}
}
_ _ _ _ _
_ _ _ _ _
When the user submit the form for the feature, you can change the "creating" variable to true so you can create more features if needed.
editor.viewModel.featureFormViewModel.on('submit', _ => {
creating = true
_ _ _ _
_ _ _ _
@JB19 @NicholasWright