Skip to content

Implement "Clear Completed" functionality #28

@MustaphaBakoji

Description

@MustaphaBakoji

Overview:
As users finish multiple tasks, the list can become cluttered with "checked" items. We need a way for users to bulk-delete only the tasks that are marked as completed, without affecting their active To-Do list.

Proposed Changes:

UI: Add a "Clear Completed" button, ideally near the footer or the top of the task list.

Logic: Create a function that filters the task array/database to remove items where status === 'completed' (or your equivalent boolean).

Validation: Show a simple confirmation toast or tooltip once the tasks are cleared.

Acceptance Criteria:

Button is visible only when at least one task is completed.

Clicking the button removes all completed tasks from state/LocalStorage.

The UI updates immediately to show only pending tasks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions