diff --git a/src/app/RecordingMetadata/ClickableLabel.tsx b/src/app/RecordingMetadata/ClickableLabel.tsx index 72113c72f..eca643a26 100644 --- a/src/app/RecordingMetadata/ClickableLabel.tsx +++ b/src/app/RecordingMetadata/ClickableLabel.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { KeyValue } from '@app/Shared/Services/api.types'; +import { KeyValue, keyValueToString } from '@app/Shared/Services/api.types'; import { Label } from '@patternfly/react-core'; import * as React from 'react'; @@ -47,8 +47,9 @@ export const ClickableLabel: React.FC = ({ label, isSel return ( <> ); diff --git a/src/app/RecordingMetadata/LabelCell.tsx b/src/app/RecordingMetadata/LabelCell.tsx index 7e5a2a42a..9ab7f8bbf 100644 --- a/src/app/RecordingMetadata/LabelCell.tsx +++ b/src/app/RecordingMetadata/LabelCell.tsx @@ -15,11 +15,10 @@ */ import { UpdateFilterOptions } from '@app/Shared/Redux/Filters/Common'; -import { KeyValue } from '@app/Shared/Services/api.types'; +import { KeyValue, keyValueToString } from '@app/Shared/Services/api.types'; import { Label, Text } from '@patternfly/react-core'; import * as React from 'react'; import { ClickableLabel } from './ClickableLabel'; -import { getLabelDisplay } from './utils'; export interface LabelCellProps { target: string; @@ -36,7 +35,7 @@ export const LabelCell: React.FC = ({ target, labels, clickableO (label: KeyValue) => { if (clickableOptions) { const labelFilterSet = new Set(clickableOptions.labelFilters); - return labelFilterSet.has(getLabelDisplay(label)); + return labelFilterSet.has(keyValueToString(label)); } return false; }, @@ -52,7 +51,7 @@ export const LabelCell: React.FC = ({ target, labels, clickableO if (clickableOptions) { clickableOptions.updateFilters(target, { filterKey: 'Label', - filterValue: getLabelDisplay(clickedLabel), + filterValue: keyValueToString(clickedLabel), deleted: isLabelSelected(clickedLabel), }); } @@ -72,8 +71,8 @@ export const LabelCell: React.FC = ({ target, labels, clickableO onLabelClick={onLabelSelectToggle} /> ) : ( -