Package com.vaadin.flow.component.shared
Interface HasAutoOpen
- All Superinterfaces:
HasElement,Serializable
- All Known Implementing Classes:
ComboBox,ComboBoxBase,DatePicker,DateTimePicker,MultiSelectComboBox,TimePicker
Mixin interface for field components that support setting auto open to
control whether the overlay should open on input click or not.
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanGets whether dropdown will open automatically or not.default voidsetAutoOpen(boolean autoOpen) Enables or disables the dropdown opening automatically.Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Method Details
-
isAutoOpen
default boolean isAutoOpen()Gets whether dropdown will open automatically or not.- Returns:
trueif enabled,falseotherwise
-
setAutoOpen
default void setAutoOpen(boolean autoOpen) Enables or disables the dropdown opening automatically. Iffalsethe dropdown is only opened when clicking the toggle button or pressing Up or Down arrow keys.- Parameters:
autoOpen-falseto prevent the dropdown from opening automatically
-