diff --git a/webui/react/src/components/MultiSortMenu.tsx b/webui/react/src/components/MultiSortMenu.tsx index 39ff00767c1d..9c6cd78b6d3b 100644 --- a/webui/react/src/components/MultiSortMenu.tsx +++ b/webui/react/src/components/MultiSortMenu.tsx @@ -1,12 +1,17 @@ +import Badge from 'hew/Badge'; import Button from 'hew/Button'; import { DirectionType, Sort, validSort } from 'hew/DataGrid/DataGrid'; import Dropdown, { MenuItem } from 'hew/Dropdown'; import Icon from 'hew/Icon'; import Select from 'hew/Select'; import { Loadable } from 'hew/utils/loadable'; +import { groupBy, mapValues } from 'lodash'; +import { Fragment, useMemo } from 'react'; +import { runColumns } from 'pages/FlatRuns/columns'; import { V1ColumnType } from 'services/api-ts-sdk'; import { ProjectColumn } from 'types'; +import { removeColumnTypePrefix } from 'utils/flatRun'; import css from './MultiSortMenu.module.scss'; @@ -25,6 +30,7 @@ interface MultiSortRowProps { onChange?: (sort: Sort) => void; onRemove?: () => void; bannedSortColumns: Set; + typeMap: Record; } interface DirectionOptionsProps { onChange?: (direction: DirectionType) => void; @@ -36,6 +42,7 @@ interface ColumnOptionsProps { onChange?: (column: string) => void; value?: string; bannedSortColumns: Set; + typeMap: Record; } export const optionsByColumnType = { @@ -146,6 +153,7 @@ const ColumnOptions: React.FC = ({ columns, value, bannedSortColumns, + typeMap, }) => (