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

Recalculate the need of more #828

Closed
porfirioribeiro opened this issue May 4, 2018 · 4 comments · May be fixed by #2573
Closed

Recalculate the need of more #828

porfirioribeiro opened this issue May 4, 2018 · 4 comments · May be fixed by #2573

Comments

@porfirioribeiro
Copy link

react-big-calendar calculates the layout of the events and the need to show the more link when the component mounts and when the window resizes, but i am using my component inside a resizeable component and the calendar events are not recalculated when the parent component resizes.

You can see a demo here: https://codesandbox.io/s/mzz0p2pr0y

The solution could be using a resize observer with a polyfill like https://github.com/que-etc/resize-observer-polyfill, or having some way to flag the calendar that it needs to update the layout.

@tobiasandersen
Copy link
Collaborator

I like the idea of using a resize observer 👍

@porfirioribeiro
Copy link
Author

It could replace the window resize event.
If i have time this weekend i will try to look how it can be done.

@nguyenanduong
Copy link

I'd also like to add that recalculation does not work well when the event div (rbc-event) has border. The More link always goes off the cell limit

@stale
Copy link

stale bot commented May 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants