UNPKG

1.93 kBTypeScriptView Raw
1import { ElementRef, Renderer } from '@angular/core';
2import { Config } from '../../config/config';
3import { DomController } from '../../platform/dom-controller';
4import { GestureController } from '../../gestures/gesture-controller';
5import { Ion } from '../ion';
6import { Platform } from '../../platform/platform';
7/**
8 * The List is a widely used interface element in almost any mobile app,
9 * and can include content ranging from basic text all the way to
10 * buttons, toggles, icons, and thumbnails.
11 *
12 * Both the list, which contains items, and the list items themselves
13 * can be any HTML element.
14 *
15 * Using the List and Item components make it easy to support various
16 * interaction modes such as swipe to edit, drag to reorder, and
17 * removing items.
18 *
19 * @demo /docs/demos/src/list/
20 * @see {@link /docs/components#lists List Component Docs}
21 * @advanced
22 *
23 * Enable the sliding items.
24 *
25 * ```ts
26 * import { Component, ViewChild } from '@angular/core';
27 * import { List } from 'ionic-angular';
28 *
29 * @Component({...})
30 * export class MyClass {
31 * @ViewChild(List) list: List;
32 *
33 * constructor() { }
34 *
35 * stopSliding() {
36 * this.list.enableSlidingItems(false);
37 * }
38 * }
39 * ```
40 *
41 */
42export declare class List extends Ion {
43 private _plt;
44 private _gestureCtrl;
45 private _domCtrl;
46 private _enableSliding;
47 private _containsSlidingItems;
48 private _slidingGesture;
49 constructor(config: Config, elementRef: ElementRef, renderer: Renderer, _plt: Platform, _gestureCtrl: GestureController, _domCtrl: DomController);
50 /**
51 * @input {boolean} If true, the sliding items will be enabled.
52 */
53 sliding: boolean;
54 /**
55 * @hidden
56 */
57 containsSlidingItem(contains: boolean): void;
58 private _updateSlidingState();
59 /**
60 * Close any sliding items that are open.
61 */
62 closeSlidingItems(): void;
63 /**
64 * @hidden
65 */
66 destroy(): void;
67}