olton / metroui-docs-old

Documentation for Metro 4 (Metro UI CSS) Component Library
https://metroui.org.ua/
Other
0 stars 0 forks source link

Treeview, how to get checked item? #8

Open akayueh opened 3 years ago

akayueh commented 3 years ago

Hi Serhill

Quick question, there doesn't seem to be a clear indication on the DOM for me to find which node has been check when using the checkbox.

for example:

Uncheck image image

Checked: image image

Is there something I missed? or is there a javascript function we can call to get all the nodes that have been checked?

ncxn commented 3 years ago

hi, try event data-on-check-click="TreeCheckClick"

function TreeCheckClick(state, check, node, tree){
console.log(node);
}