virtual-scroller 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/virtual-scroller-dom.js +1 -1
- package/bundle/virtual-scroller-dom.js.map +1 -1
- package/bundle/virtual-scroller-react.js +1 -1
- package/bundle/virtual-scroller-react.js.map +1 -1
- package/bundle/virtual-scroller.js +1 -1
- package/bundle/virtual-scroller.js.map +1 -1
- package/commonjs/Layout.js +2 -2
- package/commonjs/Layout.js.map +1 -1
- package/commonjs/VirtualScroller.constructor.js +3 -4
- package/commonjs/VirtualScroller.constructor.js.map +1 -1
- package/commonjs/VirtualScroller.state.js +5 -5
- package/commonjs/VirtualScroller.state.js.map +1 -1
- package/modules/Layout.js +2 -2
- package/modules/Layout.js.map +1 -1
- package/modules/VirtualScroller.constructor.js +3 -4
- package/modules/VirtualScroller.constructor.js.map +1 -1
- package/modules/VirtualScroller.state.js +5 -5
- package/modules/VirtualScroller.state.js.map +1 -1
- package/package.json +1 -1
- package/source/Layout.js +3 -3
- package/source/VirtualScroller.constructor.js +3 -2
- package/source/VirtualScroller.state.js +5 -5
|
@@ -161,7 +161,7 @@ export default function createStateHelpers({
|
|
|
161
161
|
function getInitialStateFromScratch() {
|
|
162
162
|
const items = initialItems
|
|
163
163
|
const state = {
|
|
164
|
-
...getInitialLayoutState.call(this, items, {
|
|
164
|
+
...getInitialLayoutState.call(this, items, { beforeStart: true }),
|
|
165
165
|
items,
|
|
166
166
|
itemStates: new Array(items.length)
|
|
167
167
|
}
|
|
@@ -221,19 +221,19 @@ export default function createStateHelpers({
|
|
|
221
221
|
warn('Reset Layout')
|
|
222
222
|
state = {
|
|
223
223
|
...state,
|
|
224
|
-
...getInitialLayoutState.call(this, state.items, {
|
|
224
|
+
...getInitialLayoutState.call(this, state.items, { beforeStart: false })
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
return state
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
function getInitialLayoutState(items, {
|
|
231
|
+
function getInitialLayoutState(items, { beforeStart }) {
|
|
232
232
|
const itemsCount = items.length
|
|
233
233
|
|
|
234
234
|
const getColumnsCount = () => this.getActualColumnsCount()
|
|
235
235
|
|
|
236
|
-
const columnsCount =
|
|
236
|
+
const columnsCount = beforeStart
|
|
237
237
|
? this.layout.getInitialLayoutValueWithFallback(
|
|
238
238
|
'columnsCount',
|
|
239
239
|
getColumnsCount,
|
|
@@ -249,7 +249,7 @@ export default function createStateHelpers({
|
|
|
249
249
|
} = this.layout.getInitialLayoutValues({
|
|
250
250
|
itemsCount,
|
|
251
251
|
columnsCount: this.getActualColumnsCount(),
|
|
252
|
-
|
|
252
|
+
beforeStart
|
|
253
253
|
})
|
|
254
254
|
|
|
255
255
|
const itemHeights = new Array(itemsCount)
|