Disable Drill here if no Subordinates

Update for Org Chart 4.

The code snippet for the Custom JavaScript step:

api.onBoxRendered((box, itemData) => {
    let itemWrap = $(box.elem).closest(".poch-group-item");
    if (!itemWrap.hasClass("poch-group-item_with-subordinates")) {
        $(box.elem).addClass("custom-class");
    }
});

Since the HTML structure changed, the box.elem is used instead of the box.elemContainer.

The custom CSS remains the same:

.poch-level-0 .custom-class .poch-toolbar{
	display: none;
}