Class ListSpliceEvent

java.lang.Object
com.vaadin.client.flow.reactive.ReactiveValueChangeEvent
com.vaadin.client.flow.nodefeature.ListSpliceEvent

public class ListSpliceEvent extends ReactiveValueChangeEvent
Event fired when the structure of a NodeList changes.
Since:
1.0
Author:
Vaadin Ltd
  • Constructor Details

    • ListSpliceEvent

      public ListSpliceEvent(NodeList source, int index, JsArray<?> remove, JsArray<?> add, boolean clear)
      Creates a new list splice event.
      Parameters:
      source - the changed list
      index - the start index of the changes
      remove - the removed items, not null
      add - the added items, not null
      clear - true when this is an event triggered upon removing all the nodes of the given list, false otherwise
  • Method Details

    • getSource

      public NodeList getSource()
      Description copied from class: ReactiveValueChangeEvent
      Gets the reactive value from which this event originates.
      Overrides:
      getSource in class ReactiveValueChangeEvent
      Returns:
      the event source
    • getIndex

      public int getIndex()
      Gets the start index of the changes.
      Returns:
      the start index of the changes
    • getRemove

      public JsArray<?> getRemove()
      Gets an array of removed items.
      Returns:
      array of removed items, not null
    • getAdd

      public JsArray<?> getAdd()
      Gets an array of added items.
      Returns:
      array of added items, not null
    • isClear

      public boolean isClear()
      Gets whether this event is a clear event.
      Returns:
      true if the event was triggered after a full clear, false otherwise.