question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Popover Mechanism on Events.

See original GitHub issue

Check that this is really a bug

  • I confirm

Reproduction link

https://replit.com/@Canopix/react-big-calendar-popover#src/mockedEvents.js

Bug description

Hello Everyone!

I’m trying to create a Calendar with popovers in events like the following example (that calendar was created with react-big-calendar) by people from @Toggl. 2022-09-08 14 34 40

In my case, I created a new EventWrapper for the events and passed it in the components prop in Calendar. You can see it here:

https://replit.com/@Canopix/react-big-calendar-popover

The main issue here is that my EventWrapper component is not in the same position as my event.

image

This is the code of my EventWrapper

<div
      id="custom-wrapper"
      {...{
        ...props,
        // style: { ...style, top: `${style.top}%`, position: 'absolute' },
      }}
    >
      <Popover>
        <PopoverTrigger>
          <div>{props.children}</div>
        </PopoverTrigger>
        <PopoverContent>
          <PopoverBody>
            Are you sure you want to have that milkshake?
          </PopoverBody>
        </PopoverContent>
      </Popover>
    </div>

The style is commented to show the bug if I put the style attribute as position absolute and the top with %. The result is the following.

image

But I lost the ability to resize the events, and the events are too small. The popover is working.

image

Now, I’m not know how to face this issue. Is there a good guide to creating popovers on events?

Thanks to all!

Expected Behavior

Custom Wrapper should be in the right place and not lose the ability to resize the events.

Actual Behavior

I described above.

react-big-calendar version

^1.5.0

React version

^16.12.0

Platform/Target and Browser Versions

MacOs Chrome

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
cutterblcommented, Nov 8, 2022

Thank You @salao-na-mao. For other’s trying to figure this out, please reference the comment above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Popover API - Chrome Developers
The Popover API provides a standard mechanism for displaying popovers on ... events can be used to react to popovers being shown or...
Read more >
Popovers - Bootstrap
Hides an element's popover. Returns to the caller before the popover has actually been hidden (i.e. before the hidden.bs.popover event occurs). This is ......
Read more >
Calendar: Show popover with detailed information on event ...
Calendar: Show popover with detailed information on event click · Open the calendar application manually · Open the calendar entry in edit mode...
Read more >
Popover API (Explainer) - Open UI
Popovers are a general class of UI that have three common behaviors: ... Events are fired synchronously when a popover is shown (...
Read more >
Gtk.Popover
By default, GtkPopover performs a GTK+ grab, in order to ensure input events get redirected to it while it is shown, and also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found