Class NativeDetails.ToggleEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<NativeDetails>
com.vaadin.flow.component.html.NativeDetails.ToggleEvent
All Implemented Interfaces:
Serializable
Enclosing class:
NativeDetails

@DomEvent("toggle") public static class NativeDetails.ToggleEvent extends ComponentEvent<NativeDetails>
Represents the DOM event "toggle". In addition to the usual events supported by HTML elements, the details element supports the toggle event, which is dispatched to the details element whenever its state changes between open and closed. It is sent after the state is changed, although if the state changes multiple times before the browser can dispatch the event, the events are coalesced so that only one is sent.
See Also:
  • Constructor Details

    • ToggleEvent

      public ToggleEvent(NativeDetails source, boolean fromClient)
      ToggleEvent base constructor.

      Note: This event is always triggered on client side. Resulting in fromClient to be always true.

      Parameters:
      source - the source component
      fromClient - true if the event originated from the client side, false otherwise
  • Method Details

    • isOpened

      public boolean isOpened()
      Return whether or not the details was opened or closed in this event.

      Delegating to the source component after the toggle event occurred.

      Returns:
      whether details are expanded or collapsed