Not able to hide zoomto button on popup

177
1
05-12-2021 07:09 AM
GiovanniVanore1
New Contributor II

Hello Guys,

I am using arcGIS 4.19 with ES module. Trying to hide default Zoomto button.

used code: 

view.popup.dividedActions.inlineActions.items[0].className = "hideZoomTO"
view.popup.dividedActions.inlineActions.items[0].visible = false;
this.view.popup.viewModel.allActions.getItemAt(0).visible = false
 
These all code are working but taking sometime. That means Its hiding but taking some micro seconds to hide the button.
 
Is there any method to hide the default button. 
0 Kudos
1 Reply
ReneRubalcava
Frequent Contributor

You can set the PopupTemplate overWriteActions to true and don't provide an actions array.

https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#overwriteActio...

This will remove it.