Skip to content

Commit

Permalink
fix: use columnDefKey as default parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodallacqua-hpe committed Oct 23, 2024
1 parent 2626927 commit 78dda83
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions webui/react/src/pages/FlatRuns/FlatRuns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,10 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
!settings.heatmapSkipped.includes(currentColumn.column)
) {
columnDefs[columnDefKey] = defaultNumberColumn(
currentColumn.column,
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[currentColumn.column] ??
defaultColumnWidths[currentColumn.column as RunColumn] ??
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
{
Expand All @@ -413,10 +413,10 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
);
} else {
columnDefs[columnDefKey] = defaultNumberColumn(
currentColumn.column,
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[currentColumn.column] ??
defaultColumnWidths[currentColumn.column as RunColumn] ??
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
undefined,
Expand All @@ -426,20 +426,20 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
}
case V1ColumnType.DATE:
columnDefs[columnDefKey] = defaultDateColumn(
currentColumn.column,
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[currentColumn.column] ??
defaultColumnWidths[currentColumn.column as RunColumn] ??
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
);
break;
case V1ColumnType.ARRAY:
columnDefs[columnDefKey] = defaultArrayColumn(
currentColumn.column,
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[currentColumn.column] ??
defaultColumnWidths[currentColumn.column as RunColumn] ??
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
);
Expand All @@ -448,10 +448,10 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
case V1ColumnType.UNSPECIFIED:
default:
columnDefs[columnDefKey] = defaultTextColumn(
currentColumn.column,
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[currentColumn.column] ??
defaultColumnWidths[currentColumn.column as RunColumn] ??
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
);
Expand Down

0 comments on commit 78dda83

Please sign in to comment.