This commit is contained in:
2025-06-19 06:07:07 -05:00
parent 74dd092a99
commit 5988d048c1
14 changed files with 391 additions and 42 deletions

View File

@@ -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()