Skip to content

Commit

Permalink
Validation must be done after initial values are set
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Jan 5, 2025
1 parent dc9b68f commit 9d1f2cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/steps/octopus_destination_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ func (s OctopusDestinationDetails) GetContainer(parent fyne.Window) *fyne.Contai
next.Enable()
}

validation("")

heading := widget.NewLabel("Octopus Destination Server")
heading.TextStyle = fyne.TextStyle{Bold: true}

Expand All @@ -112,6 +110,8 @@ func (s OctopusDestinationDetails) GetContainer(parent fyne.Window) *fyne.Contai
s.spaceId.SetPlaceHolder("Spaces-#")
s.spaceId.SetText(s.State.DestinationSpace)

validation("")

s.server.OnChanged = validation
s.apiKey.OnChanged = validation
s.spaceId.OnChanged = validation
Expand Down
4 changes: 2 additions & 2 deletions internal/steps/octopus_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ func (s OctopusDetails) GetContainer(parent fyne.Window) *fyne.Container {
next.Enable()
}

validation("")

heading := widget.NewLabel("Octopus Source Server")
heading.TextStyle = fyne.TextStyle{Bold: true}

Expand All @@ -107,6 +105,8 @@ func (s OctopusDetails) GetContainer(parent fyne.Window) *fyne.Container {
s.spaceId.SetPlaceHolder("Spaces-#")
s.spaceId.SetText(s.State.Space)

validation("")

s.server.OnChanged = validation
s.apiKey.OnChanged = validation
s.spaceId.OnChanged = validation
Expand Down

0 comments on commit 9d1f2cf

Please sign in to comment.