dosubot[bot] commented on issue #35008:
URL: https://github.com/apache/superset/issues/35008#issuecomment-3252384436

   <!-- Answer -->
   This sorting issue happens because filter values in Superset dropdowns are 
often sorted as strings, not numbers, so you get lexicographical order (e.g., 
1, 10, 2, 20) instead of numeric order (1, 2, 10, 20). The sorting logic for 
filter dropdowns is handled in the frontend, especially in Select filter 
components and their helpers. There isn't currently a built-in numeric sort for 
integer filter values—recent changes have focused on disabling frontend sorting 
for some dropdowns or using custom comparators for specific cases, but not for 
general numeric sorting in filters. This means integer values will not be 
sorted numerically by default in the filter UI unless custom logic is added in 
the frontend code[example](https://github.com/apache/superset/pull/34431).
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/04e9a0f7-a5ac-4a21-973c-87bc2876f5dc?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/04e9a0f7-a5ac-4a21-973c-87bc2876f5dc?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/04e9a0f7-a5ac-4a21-973c-87bc2876f5dc?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/04e9a0f7-a5ac-4a21-973c-87bc2876f5dc?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/04e9a0f7-a5ac-4a21-973c-87bc2876f5dc?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/04e9a0f7-a5ac-4a21-973c-87bc2876f5dc?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/04e9a0f7-a5ac-4a21-973c-87bc2876f5dc?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35008)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to