ethanselzer / react-cursor-position

A React component that decorates its children with mouse and touch coordinates relative to itself.
https://ethanselzer.github.io/react-cursor-position
MIT License
143 stars 35 forks source link

Fixing an issue with missing propTypes #36

Open Coriou opened 4 years ago

Coriou commented 4 years ago

Don't really understand the issue, but this fixes #35 by:

  1. providing an empty object to Object.keys as a default
  2. only emitting the event when there's actually something to send along with it

This fixes an issue I was having with another component using this one (ethanselzer/react-image-magnify)

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling e2fd02c9ff71236518382ce555bbf38660e3e540 on Coriou:fix-missing-props into 0f594bb6f08e774c68ef131d883ece1a55823ad0 on ethanselzer:master.

vincentdesmares commented 4 years ago

I have tested the PR and it solves the issue. Please merge!

jsingh0026 commented 4 years ago

@ethanselzer when can we expect this PR to be merged as this is a blockage in our production deployment, so knowing an expected time we can plan accordingly.

sandro768 commented 4 years ago

@ethanselzer @jacekradko can anybody merge this PR?

Coriou commented 4 years ago

To anyone having issues with this library, I have found this alternative which seems to work well: laurenashpole/react-inner-image-zoom

juanpallares commented 4 years ago

@ethanselzer @jacekradko can anybody merge this PR, please?