Class DashboardItemRemoveEvent
java.lang.Object
com.vaadin.flow.component.dashboard.DashboardItemRemoveEvent
- All Implemented Interfaces:
Serializable
Event object passed to
DashboardItemRemoveHandler when a user
attempts to remove an item from the dashboard.
This event provides access to the item being removed, its parent section (if any), and a method to proceed with the removal.
- Author:
- Vaadin Ltd.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetItem()Returns the item being removed.Returns the parent section if the item is inside a section.voidRemoves the item from the dashboard.
-
Method Details
-
getItem
Returns the item being removed.- Returns:
- the item being removed, either a
DashboardWidgetor aDashboardSection
-
getSection
Returns the parent section if the item is inside a section.- Returns:
- an
Optionalcontaining the parent section, or empty if the item is at the root level
-
removeItem
public void removeItem()Removes the item from the dashboard.Call this method to proceed with removal after validation or user confirmation. If this method is not called, the item will remain in the dashboard.
-