Hello, I have faced the next issue: after a graphic creation, I'm showing a Popup with the action "ADD" which a user should click that confirm this graphic. If the user didn't click 'add' I need to delete the graphic.
I have tried to use `sketch.delete()` on update event but it didn't work(maybe by the reason that event.state was 'completed'). Could someone help me with the issue?
If someone also will be faced with such a problem, instead of using sketch.delete you need to interact with graphicsLayer.graphics: