My widget's HTML
<div data-dojo-attach-point="selectCity" style="display:block;height:30px;margin-bottom:7px;">
<div style="float:left;height:30px;;line-height:30px;padding-left:17px;">Select City</div>
<select data-dojo-attach-point="citySelect" data-dojo-type="dijit/form/Select" style="float:right;width:50%;height:30px;"></select>
Solved! Go to Solution.
That was it, thanks a lot! For anyone else reading this, the CustomTemplateWidget provided with the WAB doesn't include that line, and it seems to me it probably should.
Robert, would you say that _WidgetsInTemplateMixin will always be needed in that return statement when building custom widgets?
I have a related follow-up question. Do I need to do anything special or include something that I haven't in order to access the map object?
Similar to my OP, when I reference this.map I am getting the HTML element with id="map", not the esri map object.
Straight from the WAB widget development doc.
When a widget instantiates, the map passes into it. As a result, you can access a map property in the postCreate or startup methods.
I know, it is strange. I can get this.map to be the esri map object in all of my methods except the one that actually will use it.
I must have a syntax error or something. I will keep digging until I find it.