diff --git a/src/plugins/vis_type_table/public/components/table_vis_grid_columns.tsx b/src/plugins/vis_type_table/public/components/table_vis_grid_columns.tsx index 6bd2c0f1739f..66aa5b6ab491 100644 --- a/src/plugins/vis_type_table/public/components/table_vis_grid_columns.tsx +++ b/src/plugins/vis_type_table/public/components/table_vis_grid_columns.tsx @@ -15,6 +15,7 @@ export const getDataGridColumns = ( event: IInterpreterRenderHandlers['event'], columnWidths: ColumnWidth[] ) => { + const formattedColumnIds = table.formattedColumns.map((column) => column.id); const filterBucket = (rowIndex: number, columnIndex: number, negate: boolean) => { event({ name: 'filterBucket', @@ -22,7 +23,7 @@ export const getDataGridColumns = ( data: [ { table: { - columns: table.columns, + columns: table.columns.filter((column) => formattedColumnIds.includes(column.id)), rows: table.rows, }, row: rowIndex,