Components:Selector Fixed double fetch

This commit is contained in:
Akmal Isomadinov 2023-11-24 16:21:38 +05:00
parent e7f5e8c47c
commit dba02ece72

View File

@ -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]