Web:Client:RoomSelector: update setTimeout into loadNextPage action

This commit is contained in:
TimofeyBoyko 2022-09-07 14:49:27 +03:00
parent c81266949e
commit ea90d17793

View File

@ -91,6 +91,8 @@ const RoomSelector = ({
const [items, setItems] = React.useState([]);
const timeoutRef = React.useRef(null);
const onSearchAction = React.useCallback(
(value) => {
onSearch && onSearch(value);
@ -142,9 +144,11 @@ const RoomSelector = ({
}
})
.finally(() => {
if (isFirstLoad) {
setTimeout(() => {
setIsFirstLoad(false);
}, 500);
}
setIsNextPageLoading(false);
});