Skip to content

Commit

Permalink
refactor: columnpicker remove hard coded value (#9342)
Browse files Browse the repository at this point in the history
  • Loading branch information
JComins000 authored May 10, 2024
1 parent feb8a7b commit 7c26fe1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions webui/react/src/components/ColumnPickerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,7 @@ const ColumnPickerMenu: React.FC<ColumnMenuProps> = ({
<div className={css.base}>
{tabs.length > 1 && (
<Pivot
items={[
V1LocationType.EXPERIMENT,
[V1LocationType.VALIDATIONS, V1LocationType.TRAINING, V1LocationType.CUSTOMMETRIC],
V1LocationType.HYPERPARAMETERS,
].map((tab) => {
items={tabs.map((tab) => {
const canonicalTab = Array.isArray(tab) ? tab[0] : tab;
return {
children: (
Expand All @@ -284,7 +280,7 @@ const ColumnPickerMenu: React.FC<ColumnMenuProps> = ({
),
forceRender: true,
key: canonicalTab,
label: locationLabelMap[canonicalTab],
label: locationLabelMap[canonicalTab as keyof typeof locationLabelMap],
};
})}
/>
Expand All @@ -305,7 +301,10 @@ const ColumnPickerMenu: React.FC<ColumnMenuProps> = ({
}
open={open}
onOpenChange={handleOpenChange}>
<Button hideChildren={isMobile} icon={<Icon name="columns" title="column picker" />}>
<Button
data-test-component="columnPickerMenu"
hideChildren={isMobile}
icon={<Icon name="columns" title="column picker" />}>
Columns
</Button>
</Dropdown>
Expand Down

0 comments on commit 7c26fe1

Please sign in to comment.