mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-10-10 06:11:22 +03:00
Deprecate NewModel() constructors; use New() instead
This commit is contained in:
@@ -149,8 +149,8 @@ type Model struct {
|
||||
delegate ItemDelegate
|
||||
}
|
||||
|
||||
// NewModel returns a new model with sensible defaults.
|
||||
func NewModel(items []Item, delegate ItemDelegate, width, height int) Model {
|
||||
// New returns a new model with sensible defaults.
|
||||
func New(items []Item, delegate ItemDelegate, width, height int) Model {
|
||||
styles := DefaultStyles()
|
||||
|
||||
sp := spinner.NewModel()
|
||||
@@ -196,6 +196,11 @@ func NewModel(items []Item, delegate ItemDelegate, width, height int) Model {
|
||||
return m
|
||||
}
|
||||
|
||||
// NewModel returns a new model with sensible defaults.
|
||||
//
|
||||
// Deprecated. Use New instead.
|
||||
var NewModel = New
|
||||
|
||||
// SetFilteringEnabled enables or disables filtering. Note that this is different
|
||||
// from ShowFilter, which merely hides or shows the input view.
|
||||
func (m *Model) SetFilteringEnabled(v bool) {
|
||||
|
Reference in New Issue
Block a user