File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -176,14 +176,19 @@ export default {
176
176
this .$_unusedViews = new Map ()
177
177
this .$_scrollDirty = false
178
178
179
- if (this .$isServer ) {
179
+ // In SSR mode, we also prerender the same number of item for the first render
180
+ // to avoir mismatch between server and client templates
181
+ if (this .prerender ) {
182
+ this .$_prerender = true
180
183
this .updateVisibleItems (false )
181
184
}
182
185
},
183
186
184
187
mounted () {
185
188
this .applyPageMode ()
186
189
this .$nextTick (() => {
190
+ // In SSR mode, render the real number of visible items
191
+ this .$_prerender = false
187
192
this .updateVisibleItems (true )
188
193
this .ready = true
189
194
})
@@ -280,7 +285,7 @@ export default {
280
285
281
286
if (! count) {
282
287
startIndex = endIndex = totalSize = 0
283
- } else if (this .$isServer ) {
288
+ } else if (this .$_prerender ) {
284
289
startIndex = 0
285
290
endIndex = this .prerender
286
291
totalSize = null
You can’t perform that action at this time.
0 commit comments