p-schedule auto scrolls to top of calendar view when adding events

UI Components for Angular
Post Reply
gabealack
Posts: 3
Joined: 31 Jul 2017, 20:03

23 Apr 2019, 00:17

Hello all,

I have a strange problem, if there are a lot of events on the month-view such that the page has to scroll down, and if I utilize a click event to add an item to the calendar, the window auto-scrolls to the top of the calendar. I've tracked it down in my own code where I simply .push() an item onto my events array, the rest seems to be happening inside the p-schedule component.

I don't have a lot to go on, but if anyone has seen a similar issue or can point me in some kind of direction, that would help a lot.

Thanks!
Last edited by gabealack on 03 May 2019, 22:43, edited 2 times in total.

gabealack
Posts: 3
Joined: 31 Jul 2017, 20:03

03 May 2019, 22:41

We managed to figure out that fullcalendar is rebuilding the displayed events whenever the contents change, which is what is causing the window to scroll up whenever they add an item.

https://cl.ly/db33715abc61

What I'm wondering now is

1. Is there a way to push events into fullcalendar without triggering the re-render?

or

2. Is there a hook or event that fires when a re-render happens so I can save and restore the scroll position of the page, to at least undo the jump after the rendering happens?

yigitfindikli
Posts: 449
Joined: 08 Aug 2018, 14:09

06 May 2019, 09:53

gabealack wrote:
03 May 2019, 22:41
We managed to figure out that fullcalendar is rebuilding the displayed events whenever the contents change, which is what is causing the window to scroll up whenever they add an item.

https://cl.ly/db33715abc61

What I'm wondering now is

1. Is there a way to push events into fullcalendar without triggering the re-render?

or

2. Is there a hook or event that fires when a re-render happens so I can save and restore the scroll position of the page, to at least undo the jump after the rendering happens?
Hi,
Can i see your code ?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests