Add things
This commit is contained in:
@ -466,9 +466,15 @@ func NewTaskEdit(com *common.Common, task *taskwarrior.Task, isNew bool) *taskEd
|
||||
}
|
||||
|
||||
opts := []picker.PickerOption{picker.WithOnCreate(onCreate)}
|
||||
if isNew {
|
||||
|
||||
// Check if task has a pre-filled project (e.g., from ProjectTaskPickerPage)
|
||||
hasPrefilledProject := task.Project != "" && task.Project != "(none)"
|
||||
|
||||
if isNew && !hasPrefilledProject {
|
||||
// New task with no project → start in filter mode for quick project search
|
||||
opts = append(opts, picker.WithFilterByDefault(true))
|
||||
} else {
|
||||
// Either existing task OR new task with pre-filled project → show list with project selected
|
||||
opts = append(opts, picker.WithDefaultValue(task.Project))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user