File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,10 @@ export default {
134
134
type: Boolean ,
135
135
default: false ,
136
136
},
137
+ delayPreviousItems: {
138
+ type: Boolean ,
139
+ default: false ,
140
+ },
137
141
},
138
142
139
143
data () {
@@ -296,19 +300,23 @@ export default {
296
300
) {
297
301
this .keysEnabled = ! (startIndex > this ._endIndex || endIndex < this ._startIndex )
298
302
299
- // Add next items
300
- this .visibleItems = items .slice (this ._startIndex , endIndex)
301
303
this .itemContainerStyle = {
302
304
height: containerHeight + ' px' ,
303
305
}
304
306
this .itemsStyle = {
305
307
marginTop: offsetTop + ' px' ,
306
308
}
307
309
308
- // Remove previous items
309
- this .$nextTick (() => {
310
+ if (this .delayPreviousItems ) {
311
+ // Add next items
312
+ this .visibleItems = items .slice (this ._startIndex , endIndex)
313
+ // Remove previous items
314
+ this .$nextTick (() => {
315
+ this .visibleItems = items .slice (startIndex, endIndex)
316
+ })
317
+ } else {
310
318
this .visibleItems = items .slice (startIndex, endIndex)
311
- })
319
+ }
312
320
313
321
this .emitUpdate && this .$emit (' update' , startIndex, endIndex)
314
322
You can’t perform that action at this time.
0 commit comments