- Notifications
You must be signed in to change notification settings - Fork 52
Description
Describe the bug
When adding a task, if you fill in all the details (description, priority, project, due date, tags) and then close the dialog by clicking outside or clicking the Cancel button, the form fields retain their values. Opening the Add Task dialog again shows the previously entered data instead of a clean/reset form.
To Reproduce
Steps to reproduce the behavior:
- Go to
http://localhost:5173/home - Click "Add Task" button to open the Add Task dialog
- Fill in some details:
- Description: "Test task"
- Priority: "L"
- Project: Select any project
- Add a tag: "urgent"
- Click "Cancel" button OR click outside the dialog to close it
- Click "Add Task" button again to reopen the dialog
- See that all previously entered values are still present
Expected behavior
When the Add Task dialog is closed (either via Cancel button or by clicking outside), all form fields should be reset to their default/empty values. Reopening the dialog should show a clean form ready for new task entry.
Video
Screen.Recording.2025-12-14.at.6.38.37.AM.mov
Desktop (please complete the following information):
- OS: macOS
- Browser: Chrome
- Version: Latest
Additional context
The issue is in Tasks.tsx. The useEffect that runs when isAddTaskOpen changes only resets isCreatingNewProject, but does not reset:
newTaskstate (description, priority, project, due, tags)tagInputstate
The form is only reset after a successful task submission, not when the dialog is cancelled/closed.
- I want to work on this issue.