Skip to content

Commit

Permalink
fix pvge mutation table count header and adjust badge selector height
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Lai committed Mar 23, 2023
1 parent f9b8f3b commit efc68e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pages/groupComparison/GroupComparisonMutationMapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export default class GroupComparisonMutationMapper extends MutationMapper<
profiledPatientCountsByGroup={this.profiledPatientCountsByGroup}
groups={this.props.groups}
formatPaginationStatusText={this.formatPaginationStatusText}
showTotalMutationCountsInCountHeader={true}
/>
);
}
Expand Down Expand Up @@ -206,7 +207,7 @@ export default class GroupComparisonMutationMapper extends MutationMapper<
groupNameWithOrdinal={
this.props.groups[groupIndex].nameWithOrdinal
}
height={149}
height={148}
/>
) : (
<ProteinImpactTypeBadgeSelector
Expand All @@ -222,7 +223,7 @@ export default class GroupComparisonMutationMapper extends MutationMapper<
groupNameWithOrdinal={
this.props.groups[groupIndex].nameWithOrdinal
}
height={109}
height={108}
/>
)}
</>
Expand Down
5 changes: 4 additions & 1 deletion src/shared/components/lazyMobXTable/LazyMobXTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ type LazyMobXTableProps<T> = {
) => JSX.Element | undefined;
deactivateColumnFilter?: (columnId: string) => void;
formatPaginationStatusText?: (text: string) => string;
showTotalMutationCountsInCountHeader?: boolean;
};

function compareValues<U extends number | string>(
Expand Down Expand Up @@ -1116,7 +1117,9 @@ export default class LazyMobXTable<T> extends React.Component<
fontWeight: 'bold',
}}
>
{_.flatten(this.store.displayData).length}{' '}
{this.props.showTotalMutationCountsInCountHeader
? _.flatten(this.store.displayData).length
: this.store.displayData.length}{' '}
{this.store.itemsLabel} (page {this.store.page + 1} of{' '}
{this.store.maxPage + 1})
</span>
Expand Down
4 changes: 4 additions & 0 deletions src/shared/components/mutationTable/MutationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export interface IMutationTableProps {
};
groups?: ComparisonGroup[];
formatPaginationStatusText?: (text: string) => string;
showTotalMutationCountsInCountHeader?: boolean;
}
import MobxPromise from 'mobxpromise';
import { getServerConfig } from 'config/config';
Expand Down Expand Up @@ -1432,6 +1433,9 @@ export default class MutationTable<
formatPaginationStatusText={
this.props.formatPaginationStatusText
}
showTotalMutationCountsInCountHeader={
this.props.showTotalMutationCountsInCountHeader
}
/>
);
}
Expand Down

0 comments on commit efc68e9

Please sign in to comment.