type UIListViewEvent
Type definition for an event that’s emitted by a view within a UIListView.
type UIListViewEvent<T = unknown> = ObservableEvent<
View,
Record<string, unknown> & {
listViewItem: T;
}
>;
Notes
- This event type includes the list item value that’s associated with the event source view, in the event data object.
Examples
// ... in an activity:
onDeleteItem(e: UIListViewEvent<MyItem>) {
let item = e.data.listViewItem;
if (!(item instanceof MyItem)) return;
// ... do something with item (of type MyItem)
}
onDeleteNestedItem(e: UIListViewEvent<MyItem>) {
while (e && !(e.data.listViewItem instanceof MyItem)) e = e.inner;
// ... same as above
Instance members
listViewItem
The list item value that’s associated with the event source view.
