-
Notifications
You must be signed in to change notification settings - Fork 28
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
Feature/manual expand #20
Feature/manual expand #20
Conversation
…er dep warning). Added expandedIndex prop so you can manually control which piece is expanded.
Thank you for your help. But your PR made the build fail. There is an incompatibility with enzyme and the new React. That why I used React 15. But it will be great if you succeed to run test successfully with react 16 |
Whoops! my bad. I'll look into using |
Take a look to the logs https://travis-ci.org/xuopled/react-svg-piechart/builds/371296673 |
Are you open to upgrading to React v16 if I can get enzyme working? It looks like I may just need an adapter plugin: http://airbnb.io/enzyme/docs/installation/react-16.html |
Of course I am! Be my guest :) |
Okay I think I got it working & tests passing with React 16. I had to add an enzyme adapter, and a requestAnimationFrame shim following this comment: jestjs/jest#4545 (comment) I also had to exclude the shim file from the tests for full coverage. EDIT: I will rebase this and push today to fix the merge conflict |
Thank you for your work. I fixed the conflict and rebased your commits |
Codecov Report
@@ Coverage Diff @@
## master #20 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 4 +1
Lines 31 32 +1
Branches 1 1
=====================================
+ Hits 31 32 +1
Continue to review full report at Codecov.
|
@tnormington Just releaded v2.1.0 Thank you for your help 😄 |
Nice! Glad to help, thank for doing the rebase I was struggling 😛 |
I added a new prop for
expandedIndex
so you can control it manually outside the component. Had to upgrade React forgetDerivedStateFromProps
, and there is 1 peer dependency warning that I couldn't resolve.