Skip to content

Commit 8ac9cdb

Browse files
author
guyplusplus
committed
fixed by commenting wrong method call
1 parent 20d1f35 commit 8ac9cdb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vis_type_custom_form_filter_accounts/public/fetch_data.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ export async function fetchData(core: CoreSetup, indexName, fieldName) {
7171
const field = indexPattern.fields.find(({ name }) => name === fieldName);
7272
const initialSearchSourceState: SearchSourceFields = {
7373
timeout: "1000ms",
74-
terminate_after: 100000,
74+
terminate_after: 100000, //from elastic_search, per shard
7575
};
7676
const query = null;
7777
const aggs = termsAgg({
7878
field: indexPattern.fields.getByName("state.keyword"),
79-
size: 100, //null means 10 as default bucket size
79+
size: 100, //if set to null, returns only top 10 states
8080
direction: 'desc',
8181
query,
8282
});
@@ -108,15 +108,15 @@ export async function fetchData(core: CoreSetup, indexName, fieldName) {
108108
// If the fetch was aborted then no need to surface this error in the UI
109109
if (error.name === 'AbortError')
110110
return;
111-
this.disable('Unable to fetch terms, error: {error.message}'); //TODO
111+
//this.disable('Unable to fetch terms, error: {error.message}'); //TODO
112112
return;
113113
}
114114
const selectOptions = _.get(resp, 'aggregations.termsAgg.buckets', []).map((bucket: any) => {
115115
return bucket?.key;
116116
});
117117

118118
if (selectOptions.length === 0) {
119-
this.disable('No value to display'); //TODO noValuesDisableMsg(fieldName, indexPattern.title));
119+
//this.disable('No value to display'); //TODO noValuesDisableMsg(fieldName, indexPattern.title));
120120
return;
121121
}
122122

0 commit comments

Comments
 (0)