Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hirenko-v authored Sep 22, 2024
1 parent daa495b commit c0a3ef3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/msg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ func showBothSelects(state map[string]string) executor.ExecuteOutput {
// Construct the flag key for the state
flagKey := fmt.Sprintf("%s-%s", state["first"], option.Flags[0])

// Check if there's an InitialOption and update the state if it’s not already set
if _, exists := state[flagKey]; !exists && option.Default != "" {
state[flagKey] = fmt.Sprintf("%s %s", option.Flags[0], option.Default)
} else if !exists {
state[flagKey] = "" // Set a default empty state if no default is provided
}
// // Check if there's an InitialOption and update the state if it’s not already set
// if _, exists := state[flagKey]; !exists && option.Default != "" {
// state[flagKey] = fmt.Sprintf("%s %s", option.Flags[0], option.Default)
// } else if !exists {
// state[flagKey] = "" // Set a default empty state if no default is provided
// }

// Add the dropdown with the InitialOption if available
sections[0].Selects.Items = append(sections[0].Selects.Items, api.Select{
Expand Down

0 comments on commit c0a3ef3

Please sign in to comment.