Skip to content

Commit

Permalink
[discover] wait for dataset to created (#8117) (#8120)
Browse files Browse the repository at this point in the history
Cache dataset is an async function that ends up creating the temporary index pattern. The temporary index pattern was not created and was causing an exception so the index pattern was never updated.

The index pattern not being updated didn't trigger the hooks to update the other parts of the app.


(cherry picked from commit 8ecba3a)

Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 39be6a9 commit eb53aa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/plugins/data/public/ui/dataset_selector/configurator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ export const Configurator = ({
/>
</EuiButton>
<EuiButton
onClick={() => {
queryString.getDatasetService().cacheDataset(dataset);
onClick={async () => {
await queryString.getDatasetService().cacheDataset(dataset);
onConfirm(dataset);
}}
fill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { cloneDeep } from 'lodash';
import { useLocation } from 'react-router-dom';
import { RequestAdapter } from '../../../../../inspector/public';
import { DiscoverViewServices } from '../../../build_services';
import { QueryStatus, search } from '../../../../../data/public';
import { search } from '../../../../../data/public';
import { validateTimeRange } from '../../helpers/validate_time_range';
import { updateSearchSource } from './update_search_source';
import { useIndexPattern } from './use_index_pattern';
Expand Down

0 comments on commit eb53aa2

Please sign in to comment.