jlai / fitness-dashboard

Dashboard for viewing Fitbit stats
https://dashboard.exercise.quest
MIT License
17 stars 3 forks source link

Add select all/none checkboxes for each meal section + total #52

Closed Xebeth closed 3 months ago

Xebeth commented 3 months ago

image

jlai commented 3 months ago

Thanks for the PR! While testing, I noticed if you select a single food log entry, it marks the section + total as checked. Generally, it should only show the section checkbox as checked if all of the items in the section are checked.

If it's partly selected, the section checkbox should use the indeterminate state to show that the section only has some of the items selected. Per the Material design spec, clicking on the indeterminate checkbox for the section should mark the remaining items as selected.

Xebeth commented 3 months ago

I'll have a look but it's my first time doing React stuff (I'm more of a backend guy).

Xebeth commented 3 months ago

OK, I've updated the code now to follow your advice.