[英]Combobox is it open or not!
我有一個問題要確定我的 combobox 是否打開。 我見過相同的主題,但該解決方案: if(combobox.dropdown.= null && combobx.dropdown.visible)
對我不起作用。 它總是正確的。 我找不到任何負責這種簡單操作的組件。 提前致謝。
組合框有 2 個關於打開/關閉操作的事件。 如果您使用addEventListener
綁定到這些事件,您可以輕松跟蹤其 state:
close Dispatched when the drop-down list is dismissed for any reason. ComboBox
open Dispatched when the user clicks the drop-down button to display the drop-down list. ComboBox
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.