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

Error when Saved sort order doesn't fit the table #92

Closed
jvetyska opened this issue Jun 19, 2012 · 1 comment
Closed

Error when Saved sort order doesn't fit the table #92

jvetyska opened this issue Jun 19, 2012 · 1 comment
Labels

Comments

@jvetyska
Copy link

I've been using the saveSort widget which is great, but now I found a issue related to it's use.
If the saved sort order is for example [5, 0] and meanwhile the table columns have changed (or are dynamic), so now there are only say 3 columns, we'll get an error inside: updateHeaderSortCount()

Saying o is undefined, after executing: o = c.headerList[s[0]]; - because it's pointing outside of the array.

Not really sure what this function does, but when I checked for undefined and just return, everything is fine.

Optimally, when applying a saveSort widget, it would make sure that the saved column is not out of bounds.

Thanks.

@Mottie
Copy link
Owner

Mottie commented Jun 21, 2012

Thanks for reporting this issue! I've fixed the sortList problem at its root. So now if the column doesn't exist, it will not cause an error.

I didn't touch the saveSort widget, so the incorrect column will still be saved, but it won't cause any problems now.

@Mottie Mottie closed this as completed Jun 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants