Skip to content

Commit

Permalink
Enable send to background in Vega (#82229)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp authored Nov 2, 2020
1 parent 085f65d commit 1e5060e
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/plugins/vis_type_vega/public/data_model/search_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class SearchAPI {
) {}

search(searchRequests: SearchRequest[]) {
const { search } = this.dependencies.search;
const { search } = this.dependencies;
const requestResponders: any = {};

return combineLatest(
Expand All @@ -59,13 +59,18 @@ export class SearchAPI {
requestResponders[requestId].json(params.body);
}

return search({ params }, { abortSignal: this.abortSignal }).pipe(
tap((data) => this.inspectSearchResult(data, requestResponders[requestId])),
map((data) => ({
name: requestId,
rawResponse: data.rawResponse,
}))
);
return search
.search(
{ params },
{ abortSignal: this.abortSignal, sessionId: search.session.getSessionId() }
)
.pipe(
tap((data) => this.inspectSearchResult(data, requestResponders[requestId])),
map((data) => ({
name: requestId,
rawResponse: data.rawResponse,
}))
);
})
);
}
Expand Down

0 comments on commit 1e5060e

Please sign in to comment.