Interface HasAutoOpen

All Superinterfaces:
HasElement, Serializable
All Known Implementing Classes:
ComboBox, ComboBoxBase, DatePicker, DateTimePicker, MultiSelectComboBox, TimePicker

public interface HasAutoOpen extends HasElement
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 Type
    Method
    Description
    default boolean
    Gets whether dropdown will open automatically or not.
    default void
    setAutoOpen(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:
      true if enabled, false otherwise
    • setAutoOpen

      default void setAutoOpen(boolean autoOpen)
      Enables or disables the dropdown opening automatically. If false the dropdown is only opened when clicking the toggle button or pressing Up or Down arrow keys.
      Parameters:
      autoOpen - false to prevent the dropdown from opening automatically