-
AuthorPosts
-
thesdhotel Friend
thesdhotel
- Join date:
- March 2017
- Posts:
- 90
- Downloads:
- 25
- Uploads:
- 1
- Thanks:
- 31
- Thanked:
- 22 times in 20 posts
October 30, 2017 at 11:22 am #1070954I noticed that if you have empty values in some field, and you order Megafilter by that field, then the empty values will show up at the top of the list when ordering DESC. The preferred behavior would be that when there are empty values, those items should always be at the end.
To see an example of the problem. Let’s say I’m ordering for a Custom Field called "Speed" and some items don’t have a "Speed" value set so they are empty.
What Happens Now:
Order by SPEED ASC (this is ok):
TITLE SPEED Item A 200 Item B 500 Item C 700 Item D with no value Item E with no value
Order by SPEED DESC (this is incorrect, because empty values are on top):
TITLE SPEED Item E with no value Item D with no value Item C 700 Item B 500 Item A 200
How it should be fixed – What should happen:
Order by SPEED ASC (same as it is now):
TITLE SPEED Item A 200 Item B 500 Item C 700 Item D with no value Item E with no value
Order by SPEED DESC (fixed with empty values always at the end):
TITLE SPEED Item C 700 Item B 500 Item A 200 Item D with no value Item E with no value
I hope my explaination is clear enough. Could you please address this?
My suggested behavior is also what Microsoft Excel does for example, empty values always go at the bottom, both when sorting ASC or DESC. When sorting, you never want to see empty values on top, they should be always at the bottom. This of course goes for any type of sorting (not only numeric, also alphabetic etc.)
Thank you!
- This topic was modified 7 years, 1 month ago by thesdhotel.
- This topic was modified 7 years, 1 month ago by thesdhotel.
1 user says Thank You to thesdhotel for this useful post
Mr.Cat ModeratorMr.Cat
- Join date:
- December 2016
- Posts:
- 270
- Downloads:
- 24
- Uploads:
- 69
- Thanks:
- 58
- Thanked:
- 53 times in 50 posts
thesdhotel Friendthesdhotel
- Join date:
- March 2017
- Posts:
- 90
- Downloads:
- 25
- Uploads:
- 1
- Thanks:
- 31
- Thanked:
- 22 times in 20 posts
October 31, 2017 at 1:55 pm #1071371Nice! So we can hope to see this in the next update?
Mr.Cat ModeratorMr.Cat
- Join date:
- December 2016
- Posts:
- 270
- Downloads:
- 24
- Uploads:
- 69
- Thanks:
- 58
- Thanked:
- 53 times in 50 posts
November 1, 2017 at 1:08 am #1071453Yes 🙂
Wisdom is not a product of schooling but of the lifelong attempt to acquire it.
1 user says Thank You to Mr.Cat for this useful post
thesdhotel Friendthesdhotel
- Join date:
- March 2017
- Posts:
- 90
- Downloads:
- 25
- Uploads:
- 1
- Thanks:
- 31
- Thanked:
- 22 times in 20 posts
January 5, 2018 at 10:20 am #1085036Hey guys,
I noticed that the latest updated broke this feature again.Please see the differences for the file:
components/com_jamegafilter/assets/js/megafilter.jshttps://www.diffchecker.com/FPDYTK4g
On the left you see the current version of the file (component 1.1.1)
This makes this feature NOT work anymore.On the right you see the previous version of the file (component 1.1.0)
This made the feature WORK CORRECTLY.In 1.1.0 it works. In 1.1.1 it doesn’t work anymore. I think it might be because you moved the "return v1 > v2 ? d : -d;" in a wrong position? Check out the differences in lines 420-430.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 8, 2018 at 9:54 am #1085550Hi,
Kindly share the credentials of your site: URL, Admin + FTP account, I will take a look.
Regards
thesdhotel Friendthesdhotel
- Join date:
- March 2017
- Posts:
- 90
- Downloads:
- 25
- Uploads:
- 1
- Thanks:
- 31
- Thanked:
- 22 times in 20 posts
January 8, 2018 at 2:14 pm #1085581Hi,
Kindly share the credentials of your site: URL, Admin + FTP account, I will take a look.
Regards?? No need to share any credentials. Also because I already fixed it on my site by restoring the old components/com_jamegafilter/assets/js/megafilter.js from the 1.1.0 version of that file.
Restore the 1.1.0 version of that file and you will see that it works. Test this with the 1.1.1 version of that file and you will see that it doesn’t work.
- This reply was modified 6 years, 11 months ago by thesdhotel.
- This reply was modified 6 years, 11 months ago by thesdhotel.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 9, 2018 at 8:27 am #1085751Hi,
We did test on our side but it still works fine, it may happen on your site specific, kindly share the credentials of your site so I can check and update for you.
Regards
-
AuthorPosts
This topic contains 7 replies, has 3 voices, and was last updated by Saguaros 6 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum