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

Is there a way to RESET sorting to original order? #70

Open
BFranklinAmsive opened this issue Mar 6, 2024 · 6 comments
Open

Is there a way to RESET sorting to original order? #70

BFranklinAmsive opened this issue Mar 6, 2024 · 6 comments

Comments

@BFranklinAmsive
Copy link

Hey there. Love the script. I'm curious, is there a built-in way to reset the table sort to loading order? Thinking of a reset button that re-sorts to the original state.

@tofsjonas
Copy link
Owner

Not at the moment, but it's a fun idea. Let me think on it, maybe it's doable 🤔

@BFranklinAmsive
Copy link
Author

That would be great. I was thinking that the original sort would need to be captured so that it could be restored to that "state" with the click of a button.

@BFranklinAmsive
Copy link
Author

I found a decently not-messy workaround. I created a new hidden 1st column called "default sort" which injects an integer, starting at 0 as table data, say 0-5. Then I used your method for Sort onLoad to bind the reset button and execute sorting based on the integers.

@tofsjonas
Copy link
Owner

Cool. Could you show me?

@leon-h-a
Copy link

leon-h-a commented Nov 4, 2024

Hello, props for the lib. 👍
Is this implemented, and if not, can I work on it?

@tofsjonas
Copy link
Owner

@leon-h-a You are more than welcome!

@tofsjonas tofsjonas reopened this Nov 20, 2024
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