File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ export default Vue.extend({
265265 type : '__qtable'
266266 } ,
267267 on : {
268- 'virtual-scroll' : ( e ) => this . $emit ( 'virtual-scroll' , e )
268+ 'virtual-scroll' : this . __onVScroll
269269 } ,
270270 class : this . tableClass ,
271271 style : this . tableStyle ,
@@ -282,6 +282,10 @@ export default Vue.extend({
282282 header ,
283283 this . getTableBody ( h )
284284 ] )
285+ } ,
286+
287+ __onVScroll ( info ) {
288+ this . $emit ( 'virtual-scroll' , info )
285289 }
286290 }
287291} )
Original file line number Diff line number Diff line change 12791279 ]
12801280 }
12811281 }
1282+ },
1283+
1284+ "virtual-scroll" : {
1285+ "desc" : " Emitted when the virtual scroll occurs, if using virtual scroll" ,
1286+ "params" : {
1287+ "details" : {
1288+ "type" : " Object" ,
1289+ "desc" : " Object of properties on the new scroll position" ,
1290+ "definition" : {
1291+ "index" : {
1292+ "type" : " Number" ,
1293+ "desc" : " Index of the list item that was scrolled into view (0 based)" ,
1294+ "examples" : [ 30 ]
1295+ },
1296+ "from" : {
1297+ "type" : " Number" ,
1298+ "desc" : " The index of the first list item that is rendered (0 based)" ,
1299+ "examples" : [ 10 ]
1300+ },
1301+ "to" : {
1302+ "type" : " Number" ,
1303+ "desc" : " The index of the last list item that is rendered (0 based)" ,
1304+ "examples" : [ 50 ]
1305+ },
1306+ "direction" : {
1307+ "type" : " String" ,
1308+ "desc" : " Direction of change" ,
1309+ "values" : [ " increase" , " decrease" ]
1310+ }
1311+ }
1312+ }
1313+ },
1314+ "addedIn" : " v1.4.1"
12821315 }
12831316 },
12841317
You can’t perform that action at this time.
0 commit comments