Update react-virtuoso
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
fbcc4f5742
commit
0845f1d14b
3 changed files with 12 additions and 5 deletions
|
@ -160,7 +160,7 @@
|
||||||
"react-sparklines": "^1.7.0",
|
"react-sparklines": "^1.7.0",
|
||||||
"react-sticky-box": "^2.0.0",
|
"react-sticky-box": "^2.0.0",
|
||||||
"react-swipeable-views": "^0.14.0",
|
"react-swipeable-views": "^0.14.0",
|
||||||
"react-virtuoso": "^4.7.13",
|
"react-virtuoso": "^4.10.2",
|
||||||
"redux": "^5.0.0",
|
"redux": "^5.0.0",
|
||||||
"redux-immutable": "^4.0.0",
|
"redux-immutable": "^4.0.0",
|
||||||
"redux-thunk": "^3.1.0",
|
"redux-thunk": "^3.1.0",
|
||||||
|
|
|
@ -212,6 +212,12 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
|
||||||
/** Figure out the initial index to scroll to. */
|
/** Figure out the initial index to scroll to. */
|
||||||
const initialIndex = useMemo<number | IndexLocationWithAlign>(() => {
|
const initialIndex = useMemo<number | IndexLocationWithAlign>(() => {
|
||||||
if (showLoading) return 0;
|
if (showLoading) return 0;
|
||||||
|
if (typeof initialTopMostItemIndex === 'number') {
|
||||||
|
return {
|
||||||
|
align: 'center',
|
||||||
|
index: initialTopMostItemIndex,
|
||||||
|
};
|
||||||
|
}
|
||||||
if (initialTopMostItemIndex) return initialTopMostItemIndex;
|
if (initialTopMostItemIndex) return initialTopMostItemIndex;
|
||||||
|
|
||||||
if (scrollData && history.action === 'POP') {
|
if (scrollData && history.action === 'POP') {
|
||||||
|
@ -231,6 +237,7 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
|
||||||
id={id}
|
id={id}
|
||||||
useWindowScroll={useWindowScroll}
|
useWindowScroll={useWindowScroll}
|
||||||
data={data}
|
data={data}
|
||||||
|
totalCount={data.length}
|
||||||
startReached={onScrollToTop}
|
startReached={onScrollToTop}
|
||||||
endReached={handleEndReached}
|
endReached={handleEndReached}
|
||||||
isScrolling={isScrolling => isScrolling && onScroll && onScroll()}
|
isScrolling={isScrolling => isScrolling && onScroll && onScroll()}
|
||||||
|
|
|
@ -9206,10 +9206,10 @@ react-transition-group@^2.2.1:
|
||||||
prop-types "^15.6.2"
|
prop-types "^15.6.2"
|
||||||
react-lifecycles-compat "^3.0.4"
|
react-lifecycles-compat "^3.0.4"
|
||||||
|
|
||||||
react-virtuoso@^4.7.13:
|
react-virtuoso@^4.10.2:
|
||||||
version "4.7.13"
|
version "4.10.2"
|
||||||
resolved "https://registry.yarnpkg.com/react-virtuoso/-/react-virtuoso-4.7.13.tgz#58ac7c5386c1f1a00f0f83a60ecb2ebdfcab35be"
|
resolved "https://registry.yarnpkg.com/react-virtuoso/-/react-virtuoso-4.10.2.tgz#a27308a3c4cfeb24722032acc0b6a46055c26967"
|
||||||
integrity sha512-rabPhipwJ8rdA6TDk1vdVqVoU6eOkWukqoC1pNQVBCsvjBvIeJMi9nO079s0L7EsRzAxFFQNahX+8vuuY4F1Qg==
|
integrity sha512-os6n9QKeKRF+8mnQR/vGy/xrFf6vXIzuaAVL54q5k2st2d5QIEwI+KDKaflMUmMvnDbPxf68bs+CF5bY3YI7qA==
|
||||||
|
|
||||||
react@^18.0.0:
|
react@^18.0.0:
|
||||||
version "18.2.0"
|
version "18.2.0"
|
||||||
|
|
Loading…
Reference in a new issue