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

fix: optimize scroll #194

Conversation

AlbajramiKevin
Copy link

optmizes the scroll by relying on css and not stated.
The existing solution was causing far too many rerenders because of a useEffect that was calling setStateX while being dependent on stateX. I just did a bunch of css changes, to make the overall scroll feel way more natural and simple.
Dont feel I broke anything, but still fail to understand what was the point of doing the scroll in tehe way that it was before.
Didnt clean the entire project, since I ran into another coupld of major bugs that need fast fixes.

@Kcamplone
Copy link

@AlbajramiKevin I had same issues and i downloaded ur code and looks good but if i set ganttHeight={540} for example, verticall scroll doesnt work.

@AlbajramiKevin
Copy link
Author

Yeah, I did those fixes and then noticed that if you set a max value for height it will break things. You could try placing that in a container somewhere, but my advice would be to not use this library tbh. If its a for a personal project thats fine, but for a real product I would suggest to look elsewhere or create something from scratch.

@Kcamplone
Copy link

Yes! I agree but we already use it so I have to fix those issues :D

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

Successfully merging this pull request may close these issues.

None yet

2 participants