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

Week and Day view, all day container triggers onSelectSlot before onDoubleClickEvent when I click on event #2715

Open
4 of 5 tasks
goskan93 opened this issue Jan 24, 2025 · 0 comments
Labels

Comments

@goskan93
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

.

Bug description

I have calendar with onDoubleClickEvent and onSelectSlot props defined

   const handleSelectSlot = (info: SlotInfo) => {
     if (info.action === 'doubleClick) {
       console.log("slot clicked")
     }
   }
    <ReactBigCalendar<CalendarEvent, EventResource>
        onDoubleClickEvent={(event: CalendarEvent, e: React.SyntheticEvent<HTMLElement>) => {
          console.log('event clicked')
        }}
        onSelectSlot={handleSelectSlot}
        {...otherProps}
      />

On month view if I dodubleclick on event, onDoubleClickEvent is triggered, if I doubleclick on slot, then onSelectSlot is triggered, which is perfect.
But on day and week view on container with all day, if I click there on event, first the onSelectSlot function is triggered and after that onDoubleClickEvent function. Which means it works completely different than in other places on calendar.

Image

Expected Behavior

Should trigger only onDoubleClickEvent when clickng on event in allDay section on month and day view

Actual Behavior

No response

react-big-calendar version

1.16.3

React version

18.2.0

Platform/Target and Browser Versions

Windows, Chrome 131.0.6778.265

Validations

  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a react-big-calendar issue and not an implementation issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@goskan93 goskan93 added the bug label Jan 24, 2025
@goskan93 goskan93 changed the title Week and Day view all day slots double clicks are detected faster that event click is I click on all day event Week and Day view all day slots double clicks are detected faster that event click if I click on all day event Jan 24, 2025
@goskan93 goskan93 changed the title Week and Day view all day slots double clicks are detected faster that event click if I click on all day event Week and Day view, all day container triggers onSelectSlot before onDoubleClickEvent when I click on event Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant