You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/03/10 21:24:27 UTC

[GitHub] [druid] vogievetsky commented on a change in pull request #9500: Update druid-query-toolkit to version 4.0

vogievetsky commented on a change in pull request #9500: Update druid-query-toolkit to version 4.0 
URL: https://github.com/apache/druid/pull/9500#discussion_r390620414
 
 

 ##########
 File path: web-console/src/views/query-view/query-output/query-output.tsx
 ##########
 @@ -239,12 +239,14 @@ export const QueryOutput = React.memo(function QueryOutput(props: QueryOutputPro
       const sorted = parsedQuery.getSorted();
       if (sorted) {
         className.push(
-          sorted.map(sorted => {
-            if (sorted.id === header) {
-              return sorted.desc ? '-sort-desc' : '-sort-asc';
-            }
-            return '';
-          })[0],
+          sorted
+            .map(sorted => {
+              if (sorted.id === header) {
+                return sorted.desc ? '-sort-desc' : '-sort-asc';
+              }
+              return '';
+            })
+            .join(''),
 
 Review comment:
   This definitely does not make sense this could create classes like `-sort-desc-sort-asc`
   
   The existing code probably does not make sense either as it will add the `undefined` class.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org