Skip to content

Commit

Permalink
revert temp clinical data value casing workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
onursumer authored and alisman committed Jan 22, 2025
1 parent e9e68b6 commit 41d489a
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions src/pages/studyView/table/ClinicalTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ import {
getFixedHeaderTableMaxLengthStringPixel,
} from '../StudyViewUtils';
import { SortDirection } from '../../../shared/components/lazyMobXTable/LazyMobXTable';
import {
EllipsisTextTooltip,
lowerCaseAndCapitalizeString,
} from 'cbioportal-frontend-commons';
import { EllipsisTextTooltip } from 'cbioportal-frontend-commons';
import { DEFAULT_SORTING_COLUMN } from '../StudyViewConfig';
import ComparisonVsIcon from 'shared/components/ComparisonVsIcon';
import { capitalizeFirstLetters } from 'cbioportal-frontend-commons';

export interface IClinicalTableProps {
data: ClinicalDataCountSummary[];
Expand Down Expand Up @@ -118,23 +114,6 @@ export default class ClinicalTable extends React.Component<
return this.props.label ? this.props.label : ColumnKey.CATEGORY;
}

// this code should be deleted when we have fixed RFC80 capitalization issues in backedn (12/12/2024)
valueFormatters = {
'Cancer Type': (str: string) => capitalizeFirstLetters(str),
'Cancer Type Detailed': (str: string) => capitalizeFirstLetters(str),
'Sample Type Detailed': (str: string) => capitalizeFirstLetters(str),
};

// this code should be deleted when we have fixed RFC80 capitalization issues in backedn (12/12/2024)
@computed get valueFormatter() {
if (this.props.title && this.props.title in this.valueFormatters) {
// @ts-ignore
return this.valueFormatters[this.props.title];
} else {
return (str: string) => str;
}
}

@computed
private get columns() {
return [
Expand Down Expand Up @@ -165,9 +144,7 @@ export default class ClinicalTable extends React.Component<
</g>
</svg>
<EllipsisTextTooltip
text={this.valueFormatter(
data.displayedValue || data.value
)}
text={data.displayedValue || data.value}
></EllipsisTextTooltip>
</div>
);
Expand Down

0 comments on commit 41d489a

Please sign in to comment.