-
Notifications
You must be signed in to change notification settings - Fork 176
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
Clear Sorting #62
Comments
Hm, hadn't considered this before. Thanks for the issue. |
I'm guessing you'd need to store the original sort somehow. On Fri, May 10, 2013 at 9:34 PM, Joseph McCullough
|
I'm not sure how this idea would be performance wise, but you could store the html of the table before you invoke the plugin, and then do a |
Oh no, that can't be a good way of doing it. For now, since I'm using backbone I refresh my collection and the table gets redrawn which is useful since its multiple user based. On Fri, May 10, 2013 at 9:46 PM, Joseph McCullough
|
I'm just thinking of ways to solve the problems without making modifications to the plugin. My goal is to keep the plugin as small and readable (and thus modifiable) as possible. I don't want to add in a new feature if it can be accomplished outside of the plugin itself. |
I don't know of any other plugins doing this. One easy method to accomplish it though is to add a column to the left with a number for each row, i.e. 1, 2, 3, 4 and sort by that initially. Then the user can go back and sort by that to "reset" the table. |
May be a bit out of topic but if I'm correct the way where sort starts are event listeners of elements with data-sort event. How about creating an unique id on sort initialization and use it to name('click.id') events, then provide an destroy method...use the id to remove event listeners and clear rest of the stuff. The problem that exists now is that without a destroy method, even after you delete the table from the DOM it still remains in the JS memory because of referencing from the plugin. |
There should be an easy way to remove the sorting of a table.
The text was updated successfully, but these errors were encountered: