msyavuz commented on code in PR #38579:
URL: https://github.com/apache/superset/pull/38579#discussion_r2930110369
##########
superset-frontend/src/visualizations/TimeTable/TimeTable.tsx:
##########
@@ -94,14 +95,21 @@ const TimeTable = ({
};
}
+ const { value: sortValue } = calculateCellValue(
+ valueField,
+ columnConfig,
+ reversedEntries,
+ );
return {
...acc,
[columnConfig.key]: (
- <ValueCell
- valueField={valueField}
- column={columnConfig}
- reversedEntries={reversedEntries}
- />
+ <span data-value={sortValue}>
Review Comment:
data-value for ValueCell is actually coming from calculateCellValue function
already inside ValueCell. This change doesn't seem relevant to me since it
already exists inside:
`src/visualizations/TimeTable/components/ValueCell/ValueCell.tsx`
##########
superset-frontend/src/visualizations/TimeTable/utils/sortUtils/sortUtils.ts:
##########
@@ -42,23 +42,20 @@ function compareValues(
}
/**
- * Sorts table rows with mixed data types for react-table
- * @param rowA - First row to compare
- * @param rowB - Second row to compare
- * @param columnId - Column identifier for sorting
- * @param descending - Whether to sort in descending order
- * @returns Numeric comparison result for react-table
+ * Sorts table rows with mixed data types for react-table.
+ *
+ * react-table handles the asc/desc direction flip internally after calling
+ * this function, so we only return the raw comparison result.
*/
export function sortNumberWithMixedTypes(
rowA: any,
rowB: any,
columnId: string,
- descending: boolean,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ _descending: boolean,
Review Comment:
Should we remove this and change references instead?
--
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]