From cd7ec826c19ce2725d64e923d8603f20803098bb Mon Sep 17 00:00:00 2001 From: Laetitia Fesselier Date: Thu, 17 Dec 2020 10:42:14 -0500 Subject: [PATCH] [Core] Download CSV duplicates fix --- jsx/StaticDataTable.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jsx/StaticDataTable.js b/jsx/StaticDataTable.js index 8b7ecb09e0b..4d8f3f36930 100644 --- a/jsx/StaticDataTable.js +++ b/jsx/StaticDataTable.js @@ -432,7 +432,6 @@ class StaticDataTable extends Component { if (this.hasFilterKeyword(this.props.Headers[j], data)) { filterMatchCount++; - filteredData.push(this.props.Data[index[i].RowIdx]); } if (useKeyword === true) { @@ -464,7 +463,8 @@ class StaticDataTable extends Component { } } - // Only display a row if all filter values have been matched + // Only display a row in the table or csv + // if all filter values have been matched if ((filterLength === filterMatchCount) && ((useKeyword === true && keywordMatch > 0) || (useKeyword === false && keywordMatch === 0))) { @@ -478,6 +478,8 @@ class StaticDataTable extends Component { ); } + + filteredData.push(this.props.Data[index[i].RowIdx]); } }