bbovenzi commented on code in PR #57680:
URL: https://github.com/apache/airflow/pull/57680#discussion_r2690964171
##########
airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:
##########
@@ -142,11 +149,32 @@ export const DataTable = <TData,>({
// Default to show columns filter only if there are actually many columns
displayed
const showColumnsFilter = allowFiltering ?? columns.length > 5;
+ const hasModelName = typeof modelName === "string" && modelName.length > 0;
+ const modelNameKey = modelName ?? "";
+ const translateModelName = useCallback(
+ (count: number) =>
+ hasModelName ? translate(modelNameKey, { count }) : translate("items", {
defaultValue: "items" }),
+ [hasModelName, modelNameKey, translate],
+ );
Review Comment:
Actually, DataTable is the one file where we have `use no memo` for now.
--
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]