mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
fix itemCount not updating properly on zero value
This commit is contained in:
@@ -94,7 +94,7 @@ export const useItemListInfiniteLoader = ({
|
|||||||
const { setItemCount } = useListContext();
|
const { setItemCount } = useListContext();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!totalItemCount || !setItemCount) {
|
if (totalItemCount == null || !setItemCount) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export const useItemListPaginatedLoader = ({
|
|||||||
const { setItemCount } = useListContext();
|
const { setItemCount } = useListContext();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!totalItemCount || !setItemCount) {
|
if (totalItemCount == null || !setItemCount) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user