|
|
@@ -34,7 +34,7 @@ const SearchModal = ({ clientId, onSelect }) => {
|
|
|
customer: state.customer.concat(customer),
|
|
|
total,
|
|
|
laoding: false,
|
|
|
- pageSize: params?.pageSize || 1
|
|
|
+ current: params?.current || 1
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -86,7 +86,9 @@ const SearchModal = ({ clientId, onSelect }) => {
|
|
|
scrollRef.current.scrollTop
|
|
|
) {
|
|
|
// 已到底部
|
|
|
- initData({ current: state.current + 1, pageSize: state.pageSize })
|
|
|
+
|
|
|
+ state.current * state.pageSize < state.total &&
|
|
|
+ initData({ current: state.current + 1, pageSize: state.pageSize })
|
|
|
}
|
|
|
}
|
|
|
// const { run: listScroller } = useThrottleFn(handleListScroll)
|