Starting from JSAPI 4.10, all custom actions are now shown under a "..." menu button, which isn't a bad thing, but I think there should be a changable threshold value, for example:
3 actions --> Buttons are directly shown
5 actions --> Buttons appear under "..."
Right now, we have 2 actions (which could be easily displayed as separate buttons), but the user first has to open the menu to find them.
Is there any workaround? Since the markup is removed from the DOM while the menu button isn't toggled, it cannot be done using CSS.
Kevin,
At 4.10 you can't override this behavior but at the next release we are going to add a way to either set a threshold or an option to disable the menu.
Kelly]
Hi,
So can you set a threshold or disable this behavior in 4.11? Trying to find in documentation...
Thanks.
Nevermind. view.popup.actionsMenuEnabled = false;
Yep actionsMenuEnabled is what you need. You can use it to show/hide the menu based on the number of actions the selected feature's popup template contains
view.popup.watch("selectedFeature",(graphic)=>{
const template =graphic.getEffectivePopupTemplate();
template.actions.length > 3 ? view.popup.actionsMenuEnabled=true : view.popup.actionsMenuEnabled=false;
});
Why do the popup action buttons overlap the feature navigation arrows? This looks like a bug to me.
Try clicking so that multiple features are selected in this sample:
https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=popup-actions
Jack,
This is a bug in 4.11. It will be fixed in 4.12. Until then here is a workaround: