forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvirtual-scroll.json
More file actions
145 lines (134 loc) · 5.02 KB
/
virtual-scroll.json
File metadata and controls
145 lines (134 loc) · 5.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
"props": {
"virtual-scroll-horizontal": {
"type": "Boolean",
"desc": "Make virtual list work in horizontal mode",
"category": "behavior"
},
"virtual-scroll-slice-size": {
"type": [ "Number", "String" ],
"desc": "Minimum number of items to render in the virtual list",
"default": "30",
"examples": [ "virtual-scroll-slice-size=\"60\"" ],
"category": "virtual-scroll"
},
"virtual-scroll-slice-ratio-before": {
"type": [ "Number", "String" ],
"desc": "Ratio of number of items in visible zone to render before it",
"default": "1",
"examples": [ "virtual-scroll-slice-ratio-before=\"0.3\"" ],
"category": "virtual-scroll",
"addedIn": "v1.14.7"
},
"virtual-scroll-slice-ratio-after": {
"type": [ "Number", "String" ],
"desc": "Ratio of number of items in visible zone to render after it",
"default": "1",
"examples": [ "virtual-scroll-slice-ratio-after=\"2\"" ],
"category": "virtual-scroll",
"addedIn": "v1.14.7"
},
"virtual-scroll-item-size": {
"type": [ "Number", "String" ],
"desc": "Default size in pixels (height if vertical, width if horizontal) of an item; This value is used for rendering the initial list; Try to use a value close to the minimum size of an item",
"default": "24",
"examples": [ "virtual-scroll-item-size=\"48\"" ],
"category": "virtual-scroll"
},
"virtual-scroll-sticky-size-start": {
"type": [ "Number", "String" ],
"desc": "Size in pixels (height if vertical, width if horizontal) of the sticky part (if using one) at the start of the list; A correct value will improve scroll precision",
"default": "0",
"examples": [ "virtual-scroll-sticky-size-start=\"48\"" ],
"category": "virtual-scroll"
},
"virtual-scroll-sticky-size-end": {
"type": [ "Number", "String" ],
"desc": "Size in pixels (height if vertical, width if horizontal) of the sticky part (if using one) at the end of the list; A correct value will improve scroll precision",
"default": "0",
"examples": [ "virtual-scroll-sticky-size-end=\"48\"" ],
"category": "virtual-scroll"
},
"table-colspan": {
"type": [ "Number", "String" ],
"desc": "The number of columns in the table (you need this if you use table-layout: fixed)",
"examples": [ "table-colspan=\"12\"" ],
"category": "virtual-scroll|content",
"addedIn": "v1.13.0"
}
},
"events": {
"virtual-scroll": {
"desc": "Emitted when the virtual scroll occurs",
"params": {
"details": {
"type": "Object",
"desc": "Object of properties on the new scroll position",
"definition": {
"index": {
"type": "Number",
"desc": "Index of the list item that was scrolled into view (0 based)",
"examples": [ 30 ]
},
"from": {
"type": "Number",
"desc": "The index of the first list item that is rendered (0 based)",
"examples": [ 10 ]
},
"to": {
"type": "Number",
"desc": "The index of the last list item that is rendered (0 based)",
"examples": [ 50 ]
},
"direction": {
"type": "String",
"desc": "Direction of change",
"values": [ "increase", "decrease" ]
},
"ref": {
"type": "Object",
"desc": "Vue reference to the QVirtualList which triggered the event",
"__exemption": [
"examples"
],
"addedIn": "v1.8.4"
}
}
}
}
}
},
"methods": {
"scrollTo": {
"desc": "Scroll the virtual scroll list to the item with the specified index (0 based)",
"params": {
"index": {
"type": [ "String", "Number" ],
"desc": "The index of the list item (0 based)",
"required": true,
"examples": [ "1", 23 ]
},
"edge": {
"type": "String",
"desc": "The edge to align to if the item is not visible already (by default it aligns to end if scrolling towards the end and to start otherwise); If the '-force' version is used then it always aligns",
"values": [ "start", "center", "end", "start-force", "center-force", "end-force" ],
"addedIn": "v1.13.0"
}
}
},
"reset": {
"desc": "Resets the virtual scroll computations; Needed for custom edge-cases"
},
"refresh": {
"desc": "Refreshes the virtual scroll list; Use it after appending items",
"params": {
"index": {
"type": [ "String", "Number" ],
"desc": "The index of the list item to scroll to after refresh (0 based); If it's not specified the scroll position is not changed; Use a negative value to keep scroll position",
"examples": [ "1", 23, -1 ]
}
},
"addedIn": "v1.8.4"
}
}
}