EN
此内容没有您的语言版本,但有英语版本。

Repeater.onitemremoved event

Applies to Windows and Windows Phone

Raised after an item has been removed from the Repeater control's data source and after the corresponding Document Object Model (DOM) element has been removed.

Syntax


<div 
    data-win-control="WinJS.UI.Repeater" 
    data-win-options="{onitemremoved : handler}">
</div>


function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
repeater.addEventListener("itemremoved", handler);
repeater.removeEventListener("itemremoved", handler);


Event information

SynchronousNo
BubblesYes
CancelableYes

 

Event handler parameters

eventInfo

Type: CustomEvent

An object that contains information about the event. The detail property of this object contains the following sub-properties:

detail.affectedElement

The DOM element that was removed.

detail.index

The index of the item that was removed.

detail.item

The corresponding data item that was removed.

detail.setPromise

A Promise that completes after the removal animations complete.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.UI

Library

Winjs.js

See also

Repeater

 

 

显示:
© 2015 Microsoft