diff options
Diffstat (limited to 'internal/tui/modal.go')
-rw-r--r-- | internal/tui/modal.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/tui/modal.go b/internal/tui/modal.go index 8277077..badc658 100644 --- a/internal/tui/modal.go +++ b/internal/tui/modal.go @@ -116,7 +116,7 @@ func (m ModalBoxModel) RenderDeleteConfirmation() string { } func (m *ModalBoxModel) activateCreateProjectModal(am AppModel) { - m.activate(ModalTypeProject, 0) + m.activate(ModalTypeProject, 0, am) if am.selectedBox == ProjectsBox && len(am.projectsBox.clients) > 0 { client := am.projectsBox.clients[am.projectsBox.selectedClient] m.form.fields[1].SetValue(client.Name) @@ -124,11 +124,12 @@ func (m *ModalBoxModel) activateCreateProjectModal(am AppModel) { m.form.fields[0].Focus() } -func (m *ModalBoxModel) activate(t ModalType, editedID int64) { +func (m *ModalBoxModel) activate(t ModalType, editedID int64, am AppModel) { m.Active = true m.Type = t m.form = t.newForm() m.editedID = editedID + m.form.SetSuggestions(am) } func (m *ModalBoxModel) deactivate() { |