react-event-calendar
react-event-calendar copied to clipboard
Fix bug whereby on first click, `ref` would be undefined
Because of the way the _eventTargets[UID] lookup is only set when the component is first mounted, it seems that on the first click/mouseover/mouseout, the first parameter to the event handler would be undefined.
This change fixes this problem by deferring to a function that can use the closure data.