Work
This commit is contained in:
@@ -53,15 +53,15 @@ var _ Widget = (*Searcher)(nil)
|
||||
|
||||
func NewSearcher(id string, style tcell.Style) *Searcher {
|
||||
ret := &Searcher{
|
||||
style: style,
|
||||
search: NewField(fmt.Sprintf("%s-searcher-field", id), style),
|
||||
}
|
||||
ret.Init(id)
|
||||
ret.Init(id, style)
|
||||
return ret
|
||||
}
|
||||
|
||||
func (w *Searcher) Init(id string) {
|
||||
func (w *Searcher) Init(id string, style tcell.Style) {
|
||||
w.id = id
|
||||
w.style = style
|
||||
w.visible = true
|
||||
w.search.SetOnChange(func(prev, curr string) {
|
||||
w.updateFilter()
|
||||
|
||||
Reference in New Issue
Block a user