Skip to content

Commit

Permalink
fix(variants): SJIP-1132 add condition on TSV export
Browse files Browse the repository at this point in the history
  • Loading branch information
AltefrohneGaelle authored Dec 9, 2024
1 parent 9b2effb commit 95f3555
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ import { exportTsvColumns, GnomadCircle, renderClinvar, renderOmim } from './uti

import styles from './index.module.css';

const EXPORT_TSV_LIMIT = 10000;

interface OwnProps {
pageIndex: number;
sqon?: ISqonGroupFilter;
Expand Down Expand Up @@ -535,8 +537,11 @@ const VariantsTable = ({
},
onTableExportClick: () => {
if (
selectedRows.length > 10000 ||
(isEmpty(selectedRows) && results.total > 10000)
selectedRows.length > EXPORT_TSV_LIMIT ||
(isEmpty(selectedRows) &&
!selectedAllResults &&
results.total > EXPORT_TSV_LIMIT) ||
(selectedAllResults && results.total > EXPORT_TSV_LIMIT)
) {
Modal.confirm({
title: intl.get('screen.variants.table.exportModal.title'),
Expand Down

0 comments on commit 95f3555

Please sign in to comment.