Closed bjvanmet closed 8 years ago
@bjvanmet Just confirming you are running v3.0.3?
Good catch, btw. I am able repro this in v3.6.0 which is the latest and greatest.
Looks like a bug in OfflineEditBasic
and OfflineEditAdvanced
where var graphic = new Graphic(adds[0].geometry,null,adds[0].attributes);
The problem is that adds[0].attributes
doesn't inject the addsResults[x].objectId
.
I'll bolt in a fix, and you'll need to upgrade and retest when I'm done.
Hi Andy,
I can't believe I'm just now finding this bug! Here's the report...
Expected behavior
Actual behavior
Steps to reproduce the behavior
This works in the offline edit sandbox right here in github: http://esri.github.io/offline-editor-js/samples/simple-edit.html.
Open a browser console (I'm using Chrome). Enter this command: map.getLayer("lineFeatureLayer").graphics; Note that in the result, the last feature listed in the graphics array has an OBJECTID attribute.
Go through the workflow of the page (go offline, draw a polyline, go online). Enter the same command as above into the browser console. There will be a new object added to the graphics array. Notice there is no object id until you reload the page. For what it is worth, refreshing the layer does not get this OBJECTID attribute populated.
Thanks for looking into it, -Bryan