List.createFiltered method

Applies to Windows and Windows Phone

Creates a live filtered projection over this list. As the list changes, the filtered projection reacts to those changes and may also change.

Syntax


var filteredListProjection = list.createFiltered(predicate);

Parameters

predicate

Type: Function

A function that accepts a single argument. The createFiltered function calls the callback with each element in the list. If the function returns true, that element will be included in the filtered list.

This function must always return the same results, given the same inputs. The results should not depend on values that are subject to change. You must call notifyMutated each time an item changes. Do not batch change notifications.

Return value

Type: FilteredListProjection

A filtered projection over the list.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.Binding

Library

Base.js

See also

List

 

 

Show:
© 2014 Microsoft. All rights reserved.