You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In handleNextMonthClick and handlePrevMonthClick event propagation is not being stopped because stopPropagation is being called on the synthetic event, not on the native event.
Alternatively, you could pass the event to the onNextMonthClick callback (as you do with onDayClick) and let the component user decide whether to stop propagation or not. I'd be happy to PR either fix. Let me know which you prefer.
The text was updated successfully, but these errors were encountered:
Pass the SytheticEvent to the onPrevMonthClick callback and the
onNextMonthClick callback so that the developer can access it as
needed.
Updated the corresponding documentation in the README.
Fixesgpbl#10
In
handleNextMonthClick
andhandlePrevMonthClick
event propagation is not being stopped becausestopPropagation
is being called on the synthetic event, not on the native event.https://github.com/gpbl/react-day-picker/blob/master/src/DayPicker.js#L58 and https://github.com/gpbl/react-day-picker/blob/master/src/DayPicker.js#L70 should be:
Alternatively, you could pass the event to the
onNextMonthClick
callback (as you do withonDayClick
) and let the component user decide whether to stop propagation or not. I'd be happy to PR either fix. Let me know which you prefer.The text was updated successfully, but these errors were encountered: