Skip to content
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

feat: add onDayPointerEnter, onDayPointerLeave props #1614

Merged
merged 1 commit into from Dec 8, 2022

Conversation

ghost
Copy link

@ghost ghost commented Dec 6, 2022

feat: add support for onPointerEnter and onPointerLeave event handlers.

Context

React doesn't call the onMouseEnter event handler when the user is moving the mouse over a non-disabled element from a disabled element, but it does call the onPointerEnter event handler.

Analysis

#1613 explains the original issue with not being able to trigger an action when the user moves the mouse over a date inside the calendar.

Solution

Adding the two event handlers doesn't solve the issue with onMouseEnter, but given that onPointerEnter does trigger correctly in React 17.0.2 and React 18.0.0, it can be used as a workaround.

@gpbl gpbl changed the title feat: add support for pointerenter and pointerleave events feat: add onDayPointerEnter, onDayPointerLeave props Dec 8, 2022
@gpbl gpbl merged commit 1fc8017 into gpbl:master Dec 8, 2022
@gpbl
Copy link
Owner

gpbl commented Dec 8, 2022

Thanks! Release coming soon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: onDayMouseEnter does not trigger when moving from disabled date to enabled date
2 participants