Does the Feature component in @ArcGIS\map-components not support CustomContent yet? I am working on migrating an app that displays custom content using the Feature widget outside of the map, however, migrating this code to components results in the custom content not appearing. I have tested by displaying it in a popup on the map and I see the custom content there, but just not in the Feature component. Before I dig deeper, I thought I'd see if anyone knows if this is just not supported yet.
Do you have a code sample, codepen, or github of what you are trying to do? Custom Content is defined on the PopupTemplate and Feature displays that info.
Hi Rene, here is a Codepen based on the sample for the Feature component. https://codepen.io/justingreco/pen/LEYLRMd
I altered the defaultGraphic to show CustomContent displaying TEST 1 and then text content displaying TEST 2. With 4.32 TEST 1 doesn't appear but if you change it to 4.31 TEST 1 and TEST 2 appear.
const defaultGraphic = {
popupTemplate: {
content: [new CustomContent({
outFields: ["*"],
creator: () => {
return '<h1>TEST 1</h1>';
}
}),
{type: 'text', text:"<h1>TEST 2</h1>"}]
}
};
Hi @Justin_Greco -
We were able to reproduce what you are experiencing with this example. We will investigate what's going on and update you soon. Thanks for reporting this!
@LaurenBoyd I just tested this issue with 4.33 and it is not displaying the custom content in the Feature widget.