Added IsOpen() to DropDown. Resolves #810

This commit is contained in:
Oliver 2023-03-25 20:14:17 +01:00
parent 84f9c0ff9d
commit f38d14c988
1 changed files with 5 additions and 0 deletions

View File

@ -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. // Focus is called by the application when the primitive receives focus.
func (d *DropDown) Focus(delegate func(p Primitive)) { func (d *DropDown) Focus(delegate func(p Primitive)) {
// If we're part of a form and this item is disabled, there's nothing the // If we're part of a form and this item is disabled, there's nothing the