I am building a custom Widget using React and am having difficulty in adding new layer information to the Attribute Table. I found the following resource: Send a layer to the Attribute Table widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS fo... but it uses a number of Dojo methods to bind the call to publishData which I am having difficulty calling from React.
Solved! Go to Solution.
Hmm. I does not matter that you have chosen to use the react framework for you development the JS API still uses dojo so I am not sure why you would be having issues using and dojo classes like on or lang. Now own is a different subject as that is part of the dojo widget portion.
I have been able to import dojo/_base/lang with success, but I have had no success with own. I did try to import dijit/Destroyable since that seems to house own, but still ran into problems using it. I'm wondering if part of the problem is with how 'this' is referenced from within the React component versus a regular widget.
Thanks for your help. I was able to remove the own() call and then break apart the dojo version to identify the layer and the widget currently in use, and from there could call publishData on the widget.