I am having trouble dynamically hiding actions within my application. I am using the view.popup.actions.push() method to add my custom actions to the view. From there I am using a selectFeature event to check for specific conditions before hiding the custom actions.
My issue is the graphic returned by the event has null actions. So using the below sample code doesn't work.
popupTemplate.actions.items.visible = true;
I have used this code for a while and haven't had any issues. But with the latest API changes that require the getEffectivePopupTemplate() function I am unable to make this work. In the past the actions array was alway populated and I was able to use the above code.
I have verified that my issue stems from using the view.popup.actions.push(). If you change out the code on the below sample to use the push method my issue is repeatable. Any help or insight would be great.