Skip to content

Show pattern for completed questions #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Show pattern for completed questions
Patch #34 introduced toggling for questions (regardless of completion
status). This patch will show patterns when the "Show/Hide Patterns"
toggle is set to "Hide" and the respective question has been completed.

Fixes #36
  • Loading branch information
Sean Prashad authored and Sean Prashad committed Jun 27, 2020
commit f40d10702ec7764cbae25aaa03e788b94a46335d
10 changes: 9 additions & 1 deletion src/components/Table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,17 @@ const Table = () => {
const patterns = `${cellInfo.row.original.pattern}`
.split(',')
.map(pattern => {
if (showPatterns[0] || checked[cellInfo.row.original.id]) {
return (
<Badge key={pattern} className={pattern} pill>
{pattern}
</Badge>
);
}

return (
<Badge key={pattern} className={pattern} pill>
{showPatterns[0] ? pattern : '***'}
***
</Badge>
);
});
Expand Down