rusackas commented on code in PR #42596:
URL: https://github.com/apache/superset/pull/42596#discussion_r3693823208


##########
superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx:
##########
@@ -720,6 +720,80 @@ describe('SelectFilterPlugin', () => {
     expect(options[2]).toHaveTextContent('beta');
   });
 
+  test('sorts numeric filter values numerically, not lexicographically, when 
no sortMetric is specified', () => {
+    // Regression for #36775: numeric filter values were sorted as strings
+    // (localeCompare on the formatted label), producing "1, 10, 100, 2"
+    // instead of the expected "1, 2, 10, 100".
+    const testData = [{ age: 10 }, { age: 2 }, { age: 100 }];

Review Comment:
   Good catch, that landed in 8966a1d. Comparator sorts by `value` instead of 
`label` for Numeric columns now, so this passes.



-- 
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