You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @cougrimes! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!
The issue you're experiencing with the 'Time column' filter not respecting the 'Sort Filter Values' option in Superset seems to be related to the implementation of sorting logic for filter values. The current implementation of the 'Time column' filter uses a Select component to display options, but there is no specific mention of sorting logic being applied to these options in the available code snippets [1][2].
To address this, you might need to check if the sorting logic is correctly implemented in the Select component or if additional logic is required to sort the options based on the Column Label or Column Name. It could be beneficial to review the onSortChanged function and ensure it is correctly updating the state to reflect the desired sorting order [3].
If the sorting logic is not present or not functioning as expected, you may need to implement custom sorting logic within the handleChange function or wherever the options are being set for the Select component. This would involve sorting the options array before it is passed to the Select component, based on your preferred criteria (Column Label first, then Column Name if no label is provided).
Not sure if @michael-s-molina@kgabryje@villebro have any time to look at this, but they were the ones that worked in or around this feature a couple years back, so here's a ping!
Screenshot
Description
Bug: Using the 'Time column' filter for dashboards in conjunction with 'Sort Filter Values' results in no sorting.
In the screenshot above, I have six different temporal columns in the table. Their column names and labels are the following:
lead_created_at
mkto_acquisition_at
mkto_acquisition_date
lead_updated_at
activity_date
activity_at
When using the Filter Configuration -> Sort filter values option in Add and Edit Filters, I would expect one of two behaviors:
However, neither of these behaviors occur; regardless of whether sort is applied as ascending or descending, the values do not sort in the picklist.
I have tested this behavior in Superset 4.0.0 and have confirmed across multiple deployments.
Design input
I would expect the ideal design pattern here to first sort based on Column Label, and if no value is provided, the raw Column Name.
The text was updated successfully, but these errors were encountered: