Skip to content
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

Add another column for notes #78

Open
mattpotato opened this issue Dec 27, 2020 · 6 comments
Open

Add another column for notes #78

mattpotato opened this issue Dec 27, 2020 · 6 comments

Comments

@mattpotato
Copy link

I think we should be able to take notes on each of the problems. Could be stored in local storage just like the check marks

@seanprashad
Copy link
Owner

Hey @mattpotato! Thanks for the suggestion - funny enough, I was thinking of adding this feature a few days ago but was wondering how to implement it so it wasn't intrusive in any way!

I'll try to give it a shot in the next little while but if you have any suggestions on how it might look/function, please feel free to share them!

@philiplee13
Copy link
Contributor

philiplee13 commented Nov 16, 2022

Heyo @seanprashad ~ it's been a while! Have some free time now that school's winding down, Mind if I try taking this one up?

@seanprashad
Copy link
Owner

Hey @philiplee13! For sure - feel free to take a crack at it and let me know if you get stuck at all. I'd look over here and see how we create another "custom" column:

accessor: 'checkbox',
id: 'checkbox',
filterByCheckbox: () => {
setData(filteredByCheckbox());
},
disableSortBy: true,
Cell: cellInfo => {
return (
<span data-tip={`Question #${Number(cellInfo.row.id) + 1}`}>
<input
type="checkbox"
checked={checked[cellInfo.row.original.id]}
onChange={() => {
checked[cellInfo.row.original.id] = !checked[
cellInfo.row.original.id
];
const question = questions.find(
q => q.id === cellInfo.row.original.id,
);
if (checked[cellInfo.row.original.id]) {
question.checkbox = 'Checked';
} else {
question.checkbox = 'Unchecked';
}
const additive = checked[cellInfo.row.original.id]
? 1
: -1;
difficultyCount[
cellInfo.row.original.difficulty
] += additive;
setDifficultyCount(difficultyCount);
setChecked([...checked]);
setData(filteredByCheckbox());
}}
/>
</span>
);
},
Filter: SelectCheckedColumnFilter,
},

@philiplee13
Copy link
Contributor

Hey @seanprashad - sorry about the delay on this one.

Actually got a bit side tracked, and a few things have came up. I unfortunately won't be able to take on this feature till probably the new year.

If you want to remove the taken-by-contributor label please feel free, sorry about this again!

@seanprashad
Copy link
Owner

No worries - appreciate you letting me know!

@aman246149
Copy link

In the note Feature, Can we also add a download note button in Navbar or somewhere else, So We can get notes In PDF format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants