Skip to content

Commit

Permalink
Added IsOpen() to DropDown. Resolves rivo#810
Browse files Browse the repository at this point in the history
  • Loading branch information
rivo committed Mar 25, 2023
1 parent 84f9c0f commit f38d14c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dropdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@ func (d *DropDown) closeList(setFocus func(Primitive)) {
}
}

// IsOpen returns true if the drop-down list is currently open.
func (d *DropDown) IsOpen() bool {
return d.open
}

// Focus is called by the application when the primitive receives focus.
func (d *DropDown) Focus(delegate func(p Primitive)) {
// If we're part of a form and this item is disabled, there's nothing the
Expand Down

0 comments on commit f38d14c

Please sign in to comment.