Work
This commit is contained in:
7
field.go
7
field.go
@@ -49,13 +49,14 @@ type Field struct {
|
||||
var _ Widget = (*Field)(nil)
|
||||
|
||||
func NewField(id string, style tcell.Style) *Field {
|
||||
f := &Field{style: style}
|
||||
f.Init(id)
|
||||
f := &Field{}
|
||||
f.Init(id, style)
|
||||
return f
|
||||
}
|
||||
|
||||
func (w *Field) Init(id string) {
|
||||
func (w *Field) Init(id string, style tcell.Style) {
|
||||
w.id = id
|
||||
w.style = style
|
||||
w.visible = true
|
||||
w.filter = func(ev *tcell.EventKey) bool {
|
||||
return h.IsBS(*ev) ||
|
||||
|
||||
Reference in New Issue
Block a user