[discover ] Remove extra field list request (#168315)

## Summary

The data view picker reloads the field list when the data view is
changed. Discover also does this. It doesn't need to happen twice so
this removes the discover field list reload call.

Addresses https://github.com/elastic/kibana/issues/167221
This commit is contained in:
Matthew Kime 2023-11-30 23:22:22 -06:00 committed by GitHub
parent a5cde4ae29
commit d85ebc5c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,7 @@ export async function loadDataView({
let fetchedDataView: DataView | null = null;
// try to fetch adhoc data view first
try {
fetchedDataView = fetchId ? await dataViews.get(fetchId, false, true) : null;
fetchedDataView = fetchId ? await dataViews.get(fetchId) : null;
if (fetchedDataView && !fetchedDataView.isPersisted()) {
return {
list: dataViewList || [],