-
Notifications
You must be signed in to change notification settings - Fork 424
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
Sorting fails when a one or more sorted columns is hidden #1015
Comments
There's not enough info/details to help you, just doing print screens of UI and code is not helpful enough for us to understand the problem. I'm not even sure if you're asking about the new |
I actually tried it on one of the samples - https://6pac.github.io/SlickGrid/examples/example-column-hidden.html I tried setting options.multiColumnSort to true. Then I select two columns to be sorted. Then I hide one of the two sorted columns. Then I select a different column to sort. Then I get the exception error Here is a loom video: https://www.loom.com/share/ab26e2aa6e674a2d93cc0428da2a6b2d |
@LordGalahad thanks, too busy today, but I'll have a look tomorrow morning (GMT+09:30). There was a lot of debate around the changes, I'll have to go back and look at exactly how we did it. |
Sorry, I'm trying to repro but I can't get the error to happen in the examples with a .js source. I notice you are referencing a .ts source directly in your examples file. How are you doing that? |
But I simplified it by just using the sample provided by the wiki here (I'm not using my own code anymore) What I just did was set a breakpoint in the sample and set options.multiColumnSort to TRUE Then, shift + click each column to sort Then hide one of the sorted columns (I hid % Complete by right clicking on the header and deselecting it) Then shift +click on another column to sort it as well. (like Start Date) When this happens, there will an exception occurring. If you use ordinary click, you will encounter no problems |
@LordGalahad thanks, I could repro. I was missing the final shift-click. @ghiscoding this is actually nothing to do with the Both of you: this does raise another usage question. If we are ordering by a column and it is then hidden, should it be removed from the sort list? I can see use cases either way. Should we create an option, say |
…ng column is in the sort list. Fixes #1015
@ghiscoding ah yes, good catch. Any opinion on the usage question? |
I'm not sure what you mean, could you elaborate? |
This is referring to the use of the |
I was ok with your PR approach, I would find that weird that we would still sort by a column that is not visible to the user since it could bring too much confusion (I like the approach of "What you see is what you get") |
OK, no worries, but in that case I should also filter for columns that exist but are Thanks for the hint on debugging too. |
should be fixed in v5.9.2 |
Yup it is fixed. Thanks |
Describe the bug
I'm not sure if this is intended behavior though.
When I have multiColumnSort enabled, and I have multiple columns currently selected like this:
And then try to hide one of the sorted columns (like GBP), so it ends up looking like this:
And then I try to click on another column (like vNoise), I get this error:
We had no problems with the old slickgrid. But since this is new implementation, it may seem to be limitation?
Reproduction
Which Framework are you using?
Other
Environment Info
Validations
The text was updated successfully, but these errors were encountered: