custom Infowindow becomes empty if multiple features selected and infowindow toggle button used

11-29-2019 01:55 AM
Occasional Contributor

I am working on custom infowindow where I am configuring empty Popup for given layer in WebMap with just title to begin with. Then I am adding custom content to said infowindow in runtime using below code.

This works nice if I have only one feature selected. If I happen to click where two features gets selected, I get option of toggle in infowindow but when I toggle between two, then I loose all custom constructed and infowindow just shows title which was configured in WebMap. What can I do retain or am I missing something? whole code is in 'PostCreate' method of widget."set-features", function () {
if ( > 0) {
array.forEach(, lang.hitch(this, function (feature) {
if (feature) {
var holderdiv = domConstruct.create("div", { "style": "height: 10px;" }, Dojoquery(".header",[0]);
var hr = domConstruct.create("hr", null, Dojoquery(".header",[0]);
var holderdiv2 = domConstruct.create("div", { "style": "height: 10px;" }, Dojoquery(".header",[0]);
var link = domConstruct.create("a", {
"style": "display: block;",
"class": "action",
"id": "relatedLink",
"innerHTML": "test link", //text that appears in the popup for the link
"href": "javascript: void(0);"
}, Dojoquery(".header",[0]);
on(link, "click", function () {
//some code

0 Kudos
0 Replies