williaster / data-ui

A collection of data-rich UI components 📈
https://williaster.github.io/data-ui/
MIT License
546 stars 69 forks source link

fix(XYChart, Network): Preserve passed onMouseLeave and onMouseMove #195

Open williaster opened 4 years ago

williaster commented 4 years ago

🏆 Enhancements

Currently if a user of XYChart or Network passes their own onMouseLeave or onMouseMove props in addition to a renderTooltip prop, the mouse handlers are overwritten by the WithTooltip provided mouse handlers and never invoked.

This PR fixes this by

Test plan

codecov[bot] commented 4 years ago

Codecov Report

Merging #195 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #195      +/-   ##
==========================================
+ Coverage   80.47%   80.49%   +0.01%     
==========================================
  Files         109      109              
  Lines        2433     2435       +2     
  Branches      571      573       +2     
==========================================
+ Hits         1958     1960       +2     
  Misses        291      291              
  Partials      184      184
Impacted Files Coverage Δ
packages/network/src/chart/Network.jsx 75.3% <ø> (ø) :arrow_up:
packages/shared/src/enhancer/WithTooltip.jsx 81.25% <100%> (+1.25%) :arrow_up:
packages/xy-chart/src/chart/XYChart.jsx 76.51% <100%> (ø) :arrow_up:

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 b63eb4a...b6384b5. Read the comment docs.