Closed seanpmaxwell closed 1 year ago
@seanpmaxwell I don't remember disabling pointer events, I added stopPropagation method though, because it was causing a bug in Safari
https://github.com/bumbeishvili/org-chart/issues/290
You can use a new method, called onExpandOrCollapse
to do the same stuff
chart.onExpandOrCollapse((d) => {
// do stuff
})
Thanks onExpandOrCollapse
is just what I needed. yeah it was prob the stopPropagation which cause it to no longer work.
Describe the bug I need to fire a JavaScript event when the descendants button is clicked. I used to be able to do that in previous versions by doing
document.addEventListener('click', (e) => e.target.closet('.node-button-g') ...do stuff)
. But now it looks like pointer events for the descendants button are disabled. It still works when I click inside the node just not the button.Additional context Please re-enable pointer events or what would be even nice would be to have a callback that is fired when the button is clicked. I noticed there is a onButtonClick function but that does not have a callback and looks more like a way to manually click the button.