[TIP] Toggle loading state when result set is completely loaded (#140181)

This commit is contained in:
Luke Gmys 2022-09-08 12:21:24 +02:00 committed by GitHub
parent 1a48a06b62
commit 4587bf7fc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,12 +153,12 @@ export const useIndicators = ({
setIndicatorCount(response.rawResponse.hits.total || 0);
if (isCompleteResponse(response)) {
setLoading(false);
searchSubscription$.current?.unsubscribe();
} else if (isErrorResponse(response)) {
setLoading(false);
searchSubscription$.current?.unsubscribe();
}
setLoading(false);
},
error: (msg) => {
searchService.showError(msg);