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

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

Projects

None yet

2 participants

@jvetyska

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
Owner

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 Jun 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment