]> git.proxmox.com Git - ui/proxmox-yew-widget-toolkit.git/commitdiff
widget: dropdown: show focus outline when picker is open
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 12 Jul 2024 08:00:59 +0000 (10:00 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 13 Jul 2024 08:09:31 +0000 (10:09 +0200)
since we cannot only rely on focus for that (the picker often has the
focus), we use a class to achieve the same thing when the picker is
open.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/widget/dropdown.rs

index c3545b80b34159d809b658ded31b20c7c5fc5456..0b12a47edf90a02506dd9e2370552a39a2097834 100644 (file)
@@ -387,6 +387,7 @@ impl Component for PwtDropdown {
             .node_ref(self.dropdown_ref.clone())
             .class("pwt-input")
             .class("pwt-input-type-text")
+            .class(self.show.then_some("picker-open"))
             .class(disabled.then_some("disabled"))
             .class("pwt-w-100")
             .class(if props.valid {