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

How to get selected element value? #31

Closed
keshav1007 opened this issue Oct 30, 2018 · 1 comment
Closed

How to get selected element value? #31

keshav1007 opened this issue Oct 30, 2018 · 1 comment

Comments

@keshav1007
Copy link

I have created org chart using this angular 6 wrapper. I would like to do some changes based on click events.

(select)="onSelect($event) - this gives me only row and column. How can i get which item i have clicked?

@FERNman
Copy link
Owner

FERNman commented Nov 12, 2018

Hi @keshav1007 ,

To get the selected item, use the Row and Column index on your data set. If your data set is, for example,

[8, 12],
[4, 5.5],
[11, 14],
[4, 5],
[3, 3.5],
[6.5, 7]

and the selected event tells you that you selected row 0 column 1, that means you've selected the 12 in the first row of the dataset.

Hope this helps,
FERNman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants