todo-macos-swiftui-sample icon indicating copy to clipboard operation
todo-macos-swiftui-sample copied to clipboard

Task cell has private copy of completed

Open alexbbrown opened this issue 3 years ago • 0 comments

https://github.com/jordansinger/todo-macos-swiftui-sample/blob/493b98f3825511b46a6d2ca700a7b39dec2ab511/Todo/ContentView.swift#L82

Thanks for sharing your project! I'm trying to understand how people solve this task list problem. I am unhappy with my own solutions so far.

I'm going to understand you sharing this project publicly as an invitation to discuss the implementation. Please let me know if you would prefer not.

In this example you have used @State to let the task toggle change the completed state, but as I recall this means your main data model won't get updated.

To illustrate this, try adding a "complete all tasks" button. I predict it won't work.

alexbbrown avatar Jul 08 '20 15:07 alexbbrown