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.
Solved! Go to Solution.
Hi @Justin_Greco -
Unfortunately, we weren't able to address this issue with the 4.33 release. We are still actively investigating a fix for this issue and hope to have a fix in 4.34. I'll be sure to update this post once we are able to address this.
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.
Hi @Justin_Greco -
Unfortunately, we weren't able to address this issue with the 4.33 release. We are still actively investigating a fix for this issue and hope to have a fix in 4.34. I'll be sure to update this post once we are able to address this.
I just tried it with the next version (4.34) and it is working. Thanks for getting this fixed!
Glad this is working for you in the next version! We have refactored the Feature component to no longer wrap widget code in it's implementation.