Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
Abort signal
  • Loading branch information
lizozom authored Sep 3, 2020
1 parent 6166e07 commit 0609254
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,15 @@ export const useAuthentications = ({
const authenticationsSearch = useCallback(
(request: AuthenticationsRequestOptions) => {
let didCancel = false;
const asyncSearch = async () => {
const async
= async () => {
abortCtrl.current = new AbortController();
setLoading(true);

const searchSubscription$ = data.search
.search<AuthenticationsRequestOptions, AuthenticationsStrategyResponse>(request, {
strategy: 'securitySolutionSearchStrategy',
signal: abortCtrl.current.signal,
abortSignal: abortCtrl.current.signal,
})
.subscribe({
next: (response) => {
Expand Down

0 comments on commit 0609254

Please sign in to comment.