iVantage / angular-ivh-treeview

A treeview for AngularJS with filtering and checkbox support.
http://ivantage.github.io/angular-ivh-treeview/
MIT License
238 stars 89 forks source link

feature: Allow for checkboxes to not propagate state to children #201

Closed fhurta closed 7 years ago

fhurta commented 7 years ago

There is new option disableCheckboxSelectionPropagation that id set to true disables propagation of state of checkboxes to children and switches off validation of parents state. Thus the checkboxes are independent on each other and selection of checkbox on any level is relevant only to it's item.

Closes #195

fhurta commented 7 years ago

Now I see I should have probably commited the built files too. But before adding it, please let me know if the changes are otherwise OK for you. Thanks!

jtrussell commented 7 years ago

Nice!

Not a big deal but you can skip the built files in future.

Would it make sense to have two separate options, one to stop parent validation and the other to stop child selections?

Would need some tests too ;).

fhurta commented 7 years ago

1) ad the two options - not sure if you mean it as a discussion or polite request.. if discussion - first, I don't see a use case for it and second, it would complicate configuration for the two scenarios (file system like case and the case where parent nodes represents sums (or some other calculations))

2) ad testing - I can't even get the environment working - tasks jshint and jasmine fail and I only can proceed with grunt -force. (I'm not JS developer so it might be my limited knowledge though. Any help appreciated.)

Anyway, I didn't thank you for this component, which is helpful and nice written so even I was able to make changes there. Thanks for your effort and sharing!

fhurta commented 7 years ago

OK, regarding to the environment, update of packages did solve the problem (it is pretty old stuff in the repo). I've added tests.

jtrussell commented 7 years ago
  1. I did mean it as discussion and am inclined to agree with you :). The only reason I ask is in the past we've gotten requests for both "halves" of that feature independently.

  2. Yeah... the env is a bit dated. Our tooling at iVantage has actually drifted quite a bit from what's used here so incremental updates no longer trickle down for free. I'm glad you got it sorted :).

Thanks for adding the tests - I'll review shortly.

jtrussell commented 7 years ago

Thanks for the contribution! This is available in v1.1.0.