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

Event menu does not open when clicking on an event #2514

Open
4 of 5 tasks
eeefg650 opened this issue Feb 19, 2024 · 1 comment
Open
4 of 5 tasks

Event menu does not open when clicking on an event #2514

eeefg650 opened this issue Feb 19, 2024 · 1 comment
Labels

Comments

@eeefg650
Copy link

eeefg650 commented Feb 19, 2024

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/xenodochial-currying-dxl85n?file=%2Fsrc%2FApp.js%3A19%2C16

Bug description

When trying to click an event, the menu doesn't open as expected,
but if I don't use withDragAndDrop,
then the problem goes away.

Or if i removed the "props.event.children" in EventComponent also the problem goes away.
You can examine the problem in the link I attached.

NOTE:
I lowered to version 0.40.8 and it works fine
but it doesn't help me because it's too old a version and breaks other things

Expected Behavior

No response

Actual Behavior

The menu will show up as expected with - "WithDragAndDrop"

react-big-calendar version

1.5.2

React version

18.0.2

Platform/Target and Browser Versions

chrome 107.0.5304.107

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
@eeefg650 eeefg650 added the bug label Feb 19, 2024
@cutterbl
Copy link
Collaborator

What is props.event.children? You have a children key on your event?

The EventWrapper component get's the props of either a TimeGridEvent or an EventCell. It's (the EventWrapper's) children are passed as a prop. If you wanted a completely custom layout, you would ignore the passed children prop all together.

Sometimes it's good to check out which props are passed in which instance. Initially setting up a dummy layout, for review, is sometimes smart.

function MyCustomEventWrapper(props) {
  console.log('[MyCustomEventWrapper]', props);
  return (<div>Temporary Dummy Wrapper</div>);
}

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

2 participants