From f38d14c988301398df5c22bd643372d74c492d34 Mon Sep 17 00:00:00 2001 From: Oliver <480930+rivo@users.noreply.github.com> Date: Sat, 25 Mar 2023 20:14:17 +0100 Subject: [PATCH] Added IsOpen() to DropDown. Resolves #810 --- dropdown.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dropdown.go b/dropdown.go index feaf1bb..f5247b4 100644 --- a/dropdown.go +++ b/dropdown.go @@ -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