Closed mswanson-me closed 6 years ago
React might be useful here.
Also addClass can be overloaded with a function. Data structure has a Boolean value describing if items are checked off or not. Could if statement in a function to look for Boolean and set the strikethrough class conditionally.
Fixed with template string and ternary operator.
https://github.com/mswanson-me/stay-focused/commit/e228adbbfc3559d4563d31ac2184aae57557b8ed
Currently, a completed item is indicated by a strikethrough, which is implemented with a simple css class toggle. When an item is deleted, the list reloads, which causes the strikethrough class to be cleared.
List data structure does include a Boolean indicating completed status.
The functionality needs to be fixed to where the strikethrough class is applied based on the Boolean value in the structure, so items will remain checked off even when the list is rerendered.