StephenChou1017 / react-big-scheduler

A scheduler and resource planning component built for React and made for modern browsers (IE10+)
https://stephenchou1017.github.io/scheduler/#/
MIT License
745 stars 415 forks source link

Does anyone know why there is this delay (see the gif) when scrolling? #224

Open roko-p opened 3 years ago

roko-p commented 3 years ago

Here's a gif with some 50 rows, which makes this delay painfully noticeable:

Screen Recording 2020-12-08 at 23 46 39

But you can also see the delay in the very demo! In the "Freeze first row" example.

So as you see, when you scroll the main content, the resources on the left scroll too, but with a short delay.

How does this even work?

Why does the left side (.resource-view) even scroll at all when you scroll the main content (.scheduler-view)?

I'm guessing it has to be some code somewhere?
When I disable Javascript in Chrome, the "synced" scrolling doesn't work any more -- that is, scrolling the main content has no effect on the element on the left, it remains static.

(I do want both to scroll, but at the same time, without a delay.)

Any help from anyone is appreciated.
Thank you!

roko-p commented 3 years ago

@jennysong do you happen to know perhaps? Or @tgBryanBailes, if you @StephenChou1017 are not maintaining the project any more unfortunately?

mohaimenmahi commented 3 years ago

I have the same issue when I scroll both horizontally and vertically. Have you found any fixing yet? @roko-p

roko-p commented 3 years ago

I have the same issue when I scroll both horizontally and vertically. Have you found any fixing yet? @roko-p

Hey @mohaimenmahi, sorry I didn't see this earlier. I haven't found a way to fix this issue directly, no. I don't understand one bit of what's happening there.


However, I have managed to freeze the first row in a different way; by adding this:

position: 'sticky', top: 0, zIndex: 3, background: "#fff"

to the style of the first <div> of the .scheduler-view (that's in src/index.js on line 246)

Hope that helps.

mohaimenmahi commented 3 years ago

Hello @roko-p, we improved it by modifying this library by our own. Here is our library:

https://www.npmjs.com/package/casta-scheduler

Hope this will help :)

mfcoxo commented 3 years ago

@mohaimenmahi do you plan on contributing your improvements back to this repo?