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

When clicking on header, table scrolls up #6

Closed
julianklumpers opened this issue May 19, 2023 · 8 comments
Closed

When clicking on header, table scrolls up #6

julianklumpers opened this issue May 19, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@julianklumpers
Copy link

julianklumpers commented May 19, 2023

Hi,

Cool lib, exactly what i was looking for.
However, when you click on the table header the page scrolls to the top of the table, is there some way to prevent this? Because we have sorting functionality on the headers.

This behavior is also in the codesandbox demo

@archfz
Copy link
Owner

archfz commented May 19, 2023

That is what the scroll up functionality tries to achive. In essence we try to replicate the click on the same position on the original header, since the cloned header doesn't have the click handlers.

@julianklumpers
Copy link
Author

Ok, i understand, is there a way to get around this? and have the click functionality on the headers without scrolling up?

@archfz
Copy link
Owner

archfz commented May 19, 2023

We need to check don't remember if it is done manually the scroll, or automatically by the click replication, or if it is manually done but it is required for the click to work.

@julianklumpers
Copy link
Author

I might have a solution to this, will test it and make a PR if it works.

@archfz archfz added the bug Something isn't working label May 22, 2023
@jjylha
Copy link

jjylha commented Feb 8, 2024

We also have some checkboxes, toggles etc. on the header but do not want the clicks to scroll back to the top of the table. Has anybody found a solution to prevent that or could there be an option to prevent it?

Otherwise, the lib works great and was just the thing we were looking for :)

@archfz
Copy link
Owner

archfz commented Feb 9, 2024

Hi @jjylha @julianklumpers. I have released 1.7.0-beta.1, please test it and tell me if it works well.

@jjylha
Copy link

jjylha commented Feb 16, 2024

Works great and as expected! Thank you sir 👍

@archfz
Copy link
Owner

archfz commented Feb 16, 2024

Released in 1.7.0

@archfz archfz closed this as completed Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants