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

Horizontal Scrollbar doesn't scroll fully to the left #231

Open
za-6174 opened this issue Feb 10, 2024 · 2 comments
Open

Horizontal Scrollbar doesn't scroll fully to the left #231

za-6174 opened this issue Feb 10, 2024 · 2 comments

Comments

@za-6174
Copy link

za-6174 commented Feb 10, 2024

Hi @MaTeMaTuK,

Thanks for this library. I am using it for my react project but I am encountering some issues related to horizontal scrolling. When I scroll to the left quickly, sometimes the horizontal scroll bar doesn't scroll fully to the left. It looks bad because it seems it cuts the timeline tasks and looks like there is more to scroll but it doesn't let me scroll. Please have a look on the video below and spot the issue in the end part of the video. Would be much appreciated if you could solve this issue 👍Thanks!

video1888748781.mp4

Picture1

@fredbabe
Copy link

Hey man

To fix it, you'll need to download the repository and integrate it directly into your project. Specifically, within gantt.tsx at line 328, there's a function designed to manage horizontal scrolling. For some reason, this function includes a condition to determine whether it should ignore certain scroll actions. This check is triggered each time scrolling stops, leading to the last scroll movement not being registered. This behavior is causing the bug you mentioned. Disabling this check seems to resolve the issue for me. However, I'm unsure of the purpose of this check, so I cannot say if this change might introduce new bugs. As of now, it appears to be working correctly in my case.

The functin could look like this after the fix:
if (scrollX !== event.currentTarget.scrollLeft) { setScrollX(event.currentTarget.scrollLeft); setIgnoreScrollEvent(true); } else { setIgnoreScrollEvent(false); }

@isleyva
Copy link

isleyva commented Mar 6, 2024

hello @fredbabe im having an issue related with the scoll in both x-axis and y-axis, im experimenting multiples rerenders while scroll is being used. did you know something about this.

thanks a lot ;)

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

No branches or pull requests

3 participants