1 | import { LayoutBase } from '../layouts/layout-base';
|
2 | import { View, CustomLayoutView, Template, KeyedTemplate } from '../core/view';
|
3 | import { Property } from '../core/properties';
|
4 | import { ChangedData } from '../../data/observable-array';
|
5 | export interface ItemsSource {
|
6 | length: number;
|
7 | getItem(index: number): any;
|
8 | }
|
9 |
|
10 |
|
11 |
|
12 | export declare class Repeater extends CustomLayoutView {
|
13 | static knownFunctions: string[];
|
14 | private _isDirty;
|
15 | private _itemTemplateSelector;
|
16 | private _itemTemplateSelectorBindable;
|
17 | ios: any;
|
18 | android: any;
|
19 | constructor();
|
20 | onLoaded(): void;
|
21 | /**
|
22 | * Gets or set the items collection of the Repeater.
|
23 | * The items property can be set to an array or an object defining length and getItem(index) method.
|
24 | */
|
25 | items: any[] | ItemsSource;
|
26 | /**
|
27 | * Gets or set the item template of the Repeater.
|
28 | */
|
29 | itemTemplate: string | Template;
|
30 | /**
|
31 | * Gets or set the item templates of the Repeater.
|
32 | */
|
33 | itemTemplates: string | Array<KeyedTemplate>;
|
34 | /**
|
35 | * Gets or set the items layout of the Repeater. Default value is StackLayout with orientation="vertical".
|
36 | */
|
37 | itemsLayout: LayoutBase;
|
38 | get itemTemplateSelector(): string | ((item: any, index: number, items: any) => string);
|
39 | set itemTemplateSelector(value: string | ((item: any, index: number, items: any) => string));
|
40 | _requestRefresh(): void;
|
41 | /**
|
42 | * Forces the Repeater to reload all its items.
|
43 | */
|
44 | refresh(): void;
|
45 | _onItemsChanged(data: ChangedData<any>): void;
|
46 | _getDefaultItemContent(index: number): View;
|
47 | private _getDataItem;
|
48 | get _childrenCount(): number;
|
49 | eachChildView(callback: (child: View) => boolean): void;
|
50 | onLayout(left: number, top: number, right: number, bottom: number): void;
|
51 | onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
52 | }
|
53 | /**
|
54 | * Represents the item template property of each Repeater instance.
|
55 | */
|
56 | export declare const itemTemplateProperty: Property<Repeater, string | Template>;
|
57 | /**
|
58 | * Represents the items template property of each Repeater instance.
|
59 | */
|
60 | export declare const itemTemplatesProperty: Property<Repeater, string | KeyedTemplate[]>;
|
61 | /**
|
62 | * Represents the property backing the items property of each Repeater instance.
|
63 | */
|
64 | export declare const itemsProperty: Property<Repeater, any[] | ItemsSource>;
|
65 | export declare const itemsLayoutProperty: Property<Repeater, LayoutBase>;
|