aminghadersohi commented on code in PR #44739:
URL: https://github.com/apache/superset/pull/44739#discussion_r4145483317


##########
superset-frontend/src/components/FilterableTable/index.tsx:
##########
@@ -98,7 +68,8 @@ export const FilterableTable = ({
         label: key,
         fieldName: key,
         headerName: key,
-        comparator: sortResults,
+        comparator: (a: CellDataType, b: CellDataType) =>
+          sortResults(a, b, data),

Review Comment:
   Addressed in de3c51cb354f623745417d0d3bc4eaaac0c0132b: all columns share one 
useCallback comparator. Its data dependency remains intentional: replacing the 
rows array updates the comparator and column definitions so sortResults uses 
the new WeakMap cache key. This removes the redundant per-column wrappers; it 
does not eliminate column/render recreation on data changes. Added a rerender 
regression covering sorting and cache population for the replacement rows 
array. All 5 FilterableTable Jest suites pass (69 tests, including 
sortResults). Pre-commit formatting/lint checks pass; frontend type-checking is 
blocked by unrelated missing generated package declarations (TS6305) and 
downstream errors.



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