From d275450fb23a7e613b9d9be57088b5aef9eae053 Mon Sep 17 00:00:00 2001 From: John Darragh Date: Sat, 2 Dec 2023 20:51:10 -0800 Subject: [PATCH] 1420 csv column selection and ordering (#1550) * My Project Filter Drawer * Remove experimental FilterButton.js * Select reasonable column data and order appropriately for CSV * Handle N/A choice in CSV file --- client/src/components/Projects/ProjectTableRow.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/components/Projects/ProjectTableRow.js b/client/src/components/Projects/ProjectTableRow.js index 8044c37d..292e5d3f 100644 --- a/client/src/components/Projects/ProjectTableRow.js +++ b/client/src/components/Projects/ProjectTableRow.js @@ -216,7 +216,9 @@ const mapCsvRules = (project, rules) => { const ruleValues = columnData.flatMap(rule => { if (rule.dataType === "choice") { - return rule.choices.map(choice => (choice.id == rule.value ? "Y" : "N")); + return rule.choices.map(choice => + choice.id == rule.value || (choice.id == 0 && !rule.value) ? "Y" : "N" + ); } else { return rule.value ? rule.value.toString() : ""; }