You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/02/10 23:20:08 UTC

[GitHub] [superset] AAfghahi commented on a change in pull request #18666: fix(sqllab): fix query results sorting

AAfghahi commented on a change in pull request #18666:
URL: https://github.com/apache/superset/pull/18666#discussion_r804227515



##########
File path: superset-frontend/src/components/FilterableTable/FilterableTable.tsx
##########
@@ -295,7 +296,30 @@ export default class FilterableTable extends PureComponent<
     sortBy: string;
     sortDirection: SortDirectionType;
   }) {
-    this.setState({ sortBy, sortDirection });
+    this.setState(

Review comment:
       this is a lot to put in a setState, could we make the sort direction into its own function and pass it in here?

##########
File path: superset-frontend/src/components/FilterableTable/FilterableTable.tsx
##########
@@ -175,8 +176,8 @@ export default class FilterableTable extends PureComponent<
     this.totalTableHeight = props.height;
 
     this.state = {
-      sortDirection: SortDirection.ASC,
       fitted: false,
+      displayedList: [...this.list],

Review comment:
       is this the entirety of the data? 

##########
File path: superset-frontend/src/components/FilterableTable/FilterableTable.tsx
##########
@@ -114,8 +114,9 @@ interface FilterableTableProps {
 
 interface FilterableTableState {
   sortBy?: string;
-  sortDirection: SortDirectionType;
+  sortDirection?: SortDirectionType;

Review comment:
       why is this optional?




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org