amaannawab923 commented on code in PR #33357:
URL: https://github.com/apache/superset/pull/33357#discussion_r2081810359


##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx:
##########
@@ -127,7 +168,8 @@ export default typedMemo(function DataTable<D extends 
object>({
     ...initialState_,
     // zero length means all pages, the `usePagination` plugin does not
     // understand pageSize = 0
-    sortBy: sortByRef.current,
+    // sortBy: sortByRef.current,
+    sortBy: serverPagination ? sortByFromParent : sortByRef.current,

Review Comment:
   sortByFromParent is the sortBy state from the persistent filterState of the 
table chart which we need on initial Render as the table loses all of its 
variables on complete re render... So getting the sortBy state from redux helps 
maintain consistency



-- 
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-unsubscr...@superset.apache.org

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


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

Reply via email to