Components:Selector Fixed double fetch
This commit is contained in:
parent
e7f5e8c47c
commit
dba02ece72
@ -261,6 +261,7 @@ const Selector = ({
|
||||
|
||||
const loadMoreItems = React.useCallback(
|
||||
(startIndex: number) => {
|
||||
if (startIndex === 1) return; //fix double fetch of the first page
|
||||
!isNextPageLoading && loadNextPage && loadNextPage(startIndex - 1);
|
||||
},
|
||||
[isNextPageLoading, loadNextPage]
|
||||
|
Loading…
Reference in New Issue
Block a user