Skip to content

Commit

Permalink
Fix (TableVis): Properly filter table columns when sending to filter … (
Browse files Browse the repository at this point in the history
#5619)

* Fix (TableVis): Properly filter table columns when sending to filter event handler

Signed-off-by: Josh Romero <[email protected]>

* add changelog

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Josh Romero <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
(cherry picked from commit 3e22939)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
github-actions[bot] committed Feb 6, 2024
1 parent 992218f commit 0acb180
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ export const getDataGridColumns = (
event: IInterpreterRenderHandlers['event'],
columnWidths: ColumnWidth[]
) => {
const formattedColumnIds = table.formattedColumns.map((column) => column.id);

Check warning on line 18 in src/plugins/vis_type_table/public/components/table_vis_grid_columns.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/vis_type_table/public/components/table_vis_grid_columns.tsx#L18

Added line #L18 was not covered by tests
const filterBucket = (rowIndex: number, columnIndex: number, negate: boolean) => {
event({
name: 'filterBucket',
data: {
data: [
{
table: {
columns: table.columns,
columns: table.columns.filter((column) => formattedColumnIds.includes(column.id)),

Check warning on line 26 in src/plugins/vis_type_table/public/components/table_vis_grid_columns.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/vis_type_table/public/components/table_vis_grid_columns.tsx#L26

Added line #L26 was not covered by tests
rows: table.rows,
},
row: rowIndex,
Expand Down

0 comments on commit 0acb180

Please sign in to comment.