Skip to content

Commit

Permalink
[Maps] Show create filter button top-term tooltip property
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Apr 3, 2020
1 parent 37c8262 commit 89b0a9a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class ESAggField implements IESAggField {
async createTooltipProperty(value: string | undefined): Promise<ITooltipProperty> {
const indexPattern = await this._source.getIndexPattern();
const tooltipProperty = new TooltipProperty(this.getName(), await this.getLabel(), value);
return new ESAggTooltipProperty(tooltipProperty, indexPattern, this);
return new ESAggTooltipProperty(tooltipProperty, indexPattern, this, this.getAggType());
}

getValueAggDsl(indexPattern: IndexPattern): unknown | null {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,22 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ESTooltipProperty } from './es_tooltip_property';
import { AGG_TYPE } from '../../../common/constants';

export class ESAggTooltipProperty extends ESTooltipProperty {
private readonly _aggType: AGG_TYPE;

constructor(
tooltipProperty: ITooltipProperty,
indexPattern: IndexPattern,
field: IField,
aggType: AGG_TYPE
) {
super(tooltipProperty, indexPattern, field);
this._aggType = aggType;
}

isFilterable(): boolean {
return false;
return this._aggType === AGG_TYPE.TERMS;
}
}

0 comments on commit 89b0a9a

Please sign in to comment.