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

Re order options in filter dropdown #599

Closed
faf3012 opened this issue Apr 29, 2014 · 2 comments
Closed

Re order options in filter dropdown #599

faf3012 opened this issue Apr 29, 2014 · 2 comments

Comments

@faf3012
Copy link

faf3012 commented Apr 29, 2014

I have a column with 'month YYYY' data. The filter displays the dropdown menu in alphabetical order but I want the options to display in month/year order. I've tried sorting the data in filter_selectSource but the order isn't maintained when the dropdown menu is displayed. I've also tried binding a function on filterInit and repopulating the select element but I can't make this work either. Any help would be greatly appreciated.

@Mottie
Copy link
Owner

Mottie commented Apr 29, 2014

Hi @faf3012!

LOL wow, I was just working with @TheSin-, in the IRC channel, on fixing this. The update you need is available in the working branch and here is a demo of it working.

Basically, the filter widget has a new class "filter-select-nosort" to prevent sorting of the select options (not what you want), and it is now built-in to use the filter_selectSource and associated parser to sort the filter options.

Once I get rid of a few more bugs and some other tweaks done, I'll push out these changes in the next version.

@faf3012
Copy link
Author

faf3012 commented Apr 29, 2014

That's incredible, just what I need. Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants