Skip to content

Commit

Permalink
Add Templates field to SelectWithAdd struct
Browse files Browse the repository at this point in the history
  • Loading branch information
minchao committed Oct 31, 2021
1 parent c2e487d commit cc2590d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions select.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ type SelectWithAdd struct {

// HideHelp sets whether to hide help information.
HideHelp bool

// Templates can be used to customize the select output. If nil is passed, the
// default templates are used. See the SelectTemplates docs for more info.
Templates *SelectTemplates
}

// Run executes the select list. Its displays the label and the list of items, asking the user to chose any
Expand All @@ -541,6 +545,7 @@ func (sa *SelectWithAdd) Run() (int, string, error) {
Size: 5,
list: list,
Pointer: sa.Pointer,
Templates: sa.Templates,
}
s.setKeys()

Expand Down

0 comments on commit cc2590d

Please sign in to comment.