| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - import { ListView as ListViewDefinition, ItemsSource, ItemEventData } from "."; | ||
| 1 | + import { ListView as ListViewDefinition, ItemsSource, ItemEventData, TemplatedItemsView } from "."; | ||
| 2 | 2 | import { CoercibleProperty, CssProperty, Style, View, Template, KeyedTemplate, Length, Property, Color, Observable, EventData, CSSType } from "../core/view"; | |
| 3 | 3 | import { parse, parseMultipleTemplates } from "../builder"; | |
| 4 | 4 | import { Label } from "../label"; | |
@@ -19,7 +19,7 @@ export module knownMultiTemplates { | |||
| 19 | 19 | const autoEffectiveRowHeight = -1; | |
| 20 | 20 | ||
| 21 | 21 | @CSSType("ListView") | |
| 22 | - export abstract class ListViewBase extends View implements ListViewDefinition { | ||
| 22 | + export abstract class ListViewBase extends View implements ListViewDefinition, TemplatedItemsView { | ||
| 23 | 23 | public static itemLoadingEvent = "itemLoading"; | |
| 24 | 24 | public static itemTapEvent = "itemTap"; | |
| 25 | 25 | public static loadMoreItemsEvent = "loadMoreItems"; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -154,6 +154,15 @@ export interface ItemsSource { | |||
| 154 | 154 | getItem(index: number): any; | |
| 155 | 155 | } | |
| 156 | 156 | ||
| 157 | + export interface TemplatedItemsView { | ||
| 158 | + items: any[] | ItemsSource; | ||
| 159 | + itemTemplate: string | Template; | ||
| 160 | + itemTemplates?: string | Array<KeyedTemplate>; | ||
| 161 | + refresh(): void; | ||
| 162 | + on(event: "itemLoading", callback: (args: ItemEventData) => void, thisArg?: any); | ||
| 163 | + off(event: "itemLoading", callback: (args: EventData) => void, thisArg?: any); | ||
| 164 | + } | ||
| 165 | + | ||
| 157 | 166 | /** | |
| 158 | 167 | * Represents the property backing the items property of each ListView instance. | |
| 159 | 168 | */ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments