dreamRs / datamods

Shiny modules to import and manipulate data into an application or addin
https://dreamrs.github.io/datamods/
GNU General Public License v3.0
138 stars 35 forks source link

Sorting Choices when filtering #66

Closed PeterRealG closed 1 year ago

PeterRealG commented 1 year ago

Hi, Forgive me if this has already been addressed somewhere but this is my first Github contribution. In my own personal use when I use the "filter_data_server" and "filter_data_ui" functions, the dropdown selection for when I choose the "picker" option is not sorted. It is always in the order in which the choices appear in the data itself. I have found that if I alter the source code in the "filter-data.R" file by replacing "choices = choices" with "choices = sort(choices)" it works as intended.

Please let me know if this is useful information.

pvictor commented 1 year ago

Thanks for raising the issue, choices are now sorted : alphabetical order for characters, levels order for factors. Available on GitHub version, soon on CRAN.

Victor