mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
This commit is contained in:
parent
1bfda63afb
commit
7a86487339
2 changed files with 4 additions and 2 deletions
|
@ -34,6 +34,8 @@ import {
|
|||
SimpleQuery,
|
||||
} from '../../common';
|
||||
|
||||
import { getFlattenedFields } from '../source_index_preview/common';
|
||||
|
||||
import { getPivotPreviewDevConsoleStatement } from './common';
|
||||
import { PIVOT_PREVIEW_STATUS, usePivotPreviewData } from './use_pivot_preview_data';
|
||||
|
||||
|
@ -197,7 +199,7 @@ export const PivotPreview: SFC<PivotPreviewProps> = React.memo(({ aggs, groupBy,
|
|||
);
|
||||
}
|
||||
|
||||
const columnKeys = Object.keys(dataFramePreviewData[0]);
|
||||
const columnKeys = getFlattenedFields(dataFramePreviewData[0]);
|
||||
columnKeys.sort(sortColumns(groupByArr));
|
||||
|
||||
const columns = columnKeys.map(k => {
|
||||
|
|
|
@ -20,7 +20,7 @@ export interface EsDoc extends Dictionary<any> {
|
|||
|
||||
export const MAX_COLUMNS = 5;
|
||||
|
||||
function getFlattenedFields(obj: EsDocSource): EsFieldName[] {
|
||||
export function getFlattenedFields(obj: EsDocSource): EsFieldName[] {
|
||||
const flatDocFields: EsFieldName[] = [];
|
||||
const newDocFields = Object.keys(obj);
|
||||
newDocFields.forEach(f => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue