Class DataChangeEvent.ItemsRemovedEvent<T>

java.lang.Object
java.util.EventObject
com.vaadin.flow.data.provider.DataChangeEvent<T>
com.vaadin.flow.data.provider.DataChangeEvent.ItemsRemovedEvent<T>
Type Parameters:
T - the data type
All Implemented Interfaces:
Serializable
Enclosing class:
DataChangeEvent<T>

public static class DataChangeEvent.ItemsRemovedEvent<T> extends DataChangeEvent<T>
An event fired when items have been removed from a DataProvider. All other items are unchanged.

A listener that does not need the details can handle this event like any other DataChangeEvent. A listing component uses it to update the item count and the visible items while keeping the state it holds for the remaining items, such as components rendered for them.

See Also:
  • Constructor Details

    • ItemsRemovedEvent

      public ItemsRemovedEvent(DataProvider<T,?> source, Collection<T> items)
      Creates a new event originating from the given data provider.
      Parameters:
      source - the data provider, not null
      items - the removed items, not null
  • Method Details

    • getItems

      public List<T> getItems()
      Gets the removed items.
      Returns:
      an unmodifiable list of the removed items, never null