mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
parent
2c008eeb2f
commit
6de340055f
1 changed files with 9 additions and 2 deletions
|
@ -18,13 +18,20 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { get } from 'lodash';
|
||||
import { EuiSpacer, EuiSwitch, EuiToolTip } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { AggParamEditorProps } from 'ui/vis/editors/default';
|
||||
import { AggConfig } from 'ui/vis';
|
||||
|
||||
function shouldShow(agg: AggConfig): boolean {
|
||||
const fieldName = get(agg, 'params.field.name');
|
||||
|
||||
return fieldName && fieldName === agg.getIndexPattern().timeFieldName;
|
||||
}
|
||||
|
||||
function DropPartialsParamEditor({ agg, aggParam, value, setValue }: AggParamEditorProps<boolean>) {
|
||||
if (agg.params.field.name !== agg.getIndexPattern().timeFieldName) {
|
||||
if (!shouldShow(agg)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue