Skip to content

Opening a popover from a FullCalendar selection - struggling to understand setPositionReference #2835

Closed Answered by atomiks
joelstein asked this question in React
Discussion options

You must be logged in to vote

It looks like there are two issues:

  • First is that elements.positionReference isn't supported as an option to useFloating(), you need to use the setter in the returned refs object: refs.setPositionReference(element).
  • Second is that the target returned from FullCalendar's select function is not actually on the DOM. If you log it out in DevTools, you'll see it's not connected to the document when you hover over it (no highlight); it seems like a different element. So the floating element is not connected to any real element for positioning, therefore it gets positioned at (0,0). I'm not familiar with that library to know the solution to this.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by joelstein
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
React
Labels
None yet
2 participants