Interface IListNotificationHandler

Used by an IListBinding to provide change notifications when items in a IListDataSource change.

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(newItem: IItem, oldItem: IItem)

Indicates that an item changed.

Parameters

  • newItem: IItem

    The updated item.

  • oldItem: IItem

    The original item.

public countChanged(newCount: number, oldCount: number)

Indicates that the number of items in the IListDataSource has changed.

Parameters

  • newCount: number

    The updated count.

  • oldCount: number

    The original count.

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 indexChanged(handle: string, newIndex: number, oldIndex: number)

Indicates that the index of an item changed.

Parameters

  • handle: string

    The temporary ID of the item.

  • newIndex: number

    The new index.

  • oldIndex: number

    The original index.

public inserted(itemPromise: IItemPromise, previousHandle: string, nextHandle: string)

Indicates that an item was added to the IListDataSource.

Parameters

  • itemPromise: IItemPromise

    A promise for the new IItem.

  • previousHandle: string

    The temporary ID of the item that precedes the new item.

  • nextHandle: string

    The temporary ID of the item that follows the new item.

public itemAvailable(item: IItem)

Indicates that an IItemPromise was fulfilled and that the item is now available.

Parameters

  • item: IItem

    The fulfilled item.

public moved(item: IItemPromise, previousHandle: string, nextHandle: string)

Indicates that an item was moved.

Parameters

  • item: IItemPromise

    A promise for the IItem that was moved.

  • previousHandle: string

    The temporary ID of the item that now precedes the moved item.

  • nextHandle: string

    The temporary ID of the item that now follows the moved item.

public removed(handle: string, mirage: boolean)

Indicates that an item was removed.

Parameters

  • handle: string

    The temporary ID of the item that was removed.

  • mirage: boolean

    true if the item never actually existed; false if the item was actually present in the IListDataSource.