reactabular / treetabular

Tree utilities (MIT)
MIT License
11 stars 6 forks source link

fixed toggleChildren method doesn't render css correctly #4

Closed softage0 closed 7 years ago

softage0 commented 7 years ago

Since toggleChildren doesn't pass parentField to hasChildren method, className is not decided correctly.

It fixed by passing parentField to hasChildren method.

codecov-io commented 7 years ago

Codecov Report

Merging #4 into master will increase coverage by 11.11%.

@@            Coverage Diff            @@
##           master     #4       +/-   ##
=========================================
+ Coverage   88.88%   100%   +11.11%     
=========================================
  Files          16     16               
  Lines         234    232        -2     
  Branches       90     90               
=========================================
+ Hits          208    232       +24     
+ Misses         26      0       -26
Impacted Files Coverage Δ
src/filter.js 100% <100%> (ø) :white_check_mark:
src/toggle-children.js 100% <100%> (+96.29%) :white_check_mark:
src/get-parents.js 100% <100%> (ø) :white_check_mark:
src/search.js 100% <100%> (ø) :white_check_mark:
src/get-level.js 100% <100%> (ø) :white_check_mark:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2b08d50...290e04c. Read the comment docs.

softage0 commented 7 years ago

oh only toggle-children.js test is missed :(

It looks I need to add test case first lol

bebraw commented 7 years ago

Yeah, good after a test case.

softage0 commented 7 years ago

Test cases has been added. This PR also fixes Issue #3.

bebraw commented 7 years ago

Published as 3.0. Thanks. 👍

softage0 commented 7 years ago

Cool!

It's little late to say that, but thanks for your work reactabular that includes all features what I need from React-based table :)

bebraw commented 7 years ago

No probs. Note that I changed the index treatment of toggling to match the old behavior so you may have to write a callback. 👍