Interface IListDataNotificationHandler

Notifies clients when an IListDataAdapter object's data changes.

Index

Methods

Methods

public beginNotifications()

Indicates the start of a notification batch. Objects that are listening for notifications should defer making updates until endNotifications is called.

public changed(item: IItem)

Raises a notification that an item in the IListDataAdapter object's data source has changed.

Parameters

  • item: IItem

    The item that changed.

public endNotifications()

Indicates the end of a notification batch. When the beginNotifications method is called, objects listening for notifications should defer making updates until endNotifications is called.

public inserted(newItem: IItem, previousKey: string, nextKey: string, index?: number)

Raises a notification that an item has been added to the IListDataAdapter object's data source.

Parameters

  • newItem: IItem

    The new item added to the IListDataAdapter object's data source.

  • previousKey: string

    The key of the item that now precedes the new item, or null if the item was inserted at the start of the list. If nextKey is provided, this parameter may be null.

  • nextKey: string

    The key of the item that now follows the new item, or null if the item was inserted at the end of the list. If previousKey is provided, this parameter may be null.

  • index?: number optional

    The index of the new item.

public invalidateAll(): Promise

Indicates that all previous data obtained from the IListDataAdapter is invalid and should be refreshed.

Returns

Promise

A Promise that completes when the data has been completely refreshed and all change notifications have been sent.

public moved(item: IItem, previousKey: string, nextKey: string, oldIndex?: number, newIndex?: number)

Raises a notification that an item was moved within the IListDataAdapter object's data source.

Parameters

  • item: IItem

    The item that was moved.

  • previousKey: string

    The key of the item that now precedes the new item, or null if the item was moved to the beginning of the list. If nextKey is provided, this parameter may be null.

  • nextKey: string

    The key of the item that now follows the new item, or null if the item was moved to the end of the list. If previousKey is provided, this parameter may be null.

  • oldIndex?: number optional

    The item's original index.

  • newIndex?: number optional

    The item's new index.

public reload()

Reloads data from the IListDataAdapter.

public removed(key: string, index?: number)

Raises a notification that an item was removed from the IListDataAdapter object's data source.

Parameters

  • key: string

    The key of the item that was removed.

  • index?: number optional

    The index of the item that was removed.