Skip to content

Commit

Permalink
1420 csv column selection and ordering (#1550)
Browse files Browse the repository at this point in the history
* My Project Filter Drawer

* Remove experimental FilterButton.js

* Select reasonable column data and order appropriately for CSV

* Handle N/A choice in CSV file
  • Loading branch information
entrotech authored Dec 3, 2023
1 parent 75414f6 commit d275450
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/components/Projects/ProjectTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() : "";
}
Expand Down

0 comments on commit d275450

Please sign in to comment.