From cc2590d76a1edef3038e4dc07767109b5850ec41 Mon Sep 17 00:00:00 2001 From: minchao Date: Sun, 31 Oct 2021 14:40:54 +0800 Subject: [PATCH] Add Templates field to SelectWithAdd struct --- select.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/select.go b/select.go index b58ed97..55bec32 100644 --- a/select.go +++ b/select.go @@ -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 @@ -541,6 +545,7 @@ func (sa *SelectWithAdd) Run() (int, string, error) { Size: 5, list: list, Pointer: sa.Pointer, + Templates: sa.Templates, } s.setKeys()