Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pass event on node-click #347

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/d3-org-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class OrgChart {
onZoomStart: e => { }, // Callback for zoom & panning start
onZoom: e => { }, // Callback for zoom & panning
onZoomEnd: e => { }, // Callback for zoom & panning end
onNodeClick: (d) => d, // Callback for node click
onNodeClick: (d, event) => d, // Callback for node click
onExpandOrCollapse: (d) => d, // Callback for node expand or collapse

/*
Expand Down Expand Up @@ -1036,7 +1036,7 @@ export class OrgChart {
return;
}
if (!data._pagingButton) {
attrs.onNodeClick(node);
attrs.onNodeClick(node, event);
return;
}
console.log('event fired, no handlers')
Expand Down