From 232b005c4afd8cd668c8e47bed4c53e3e3dfb815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eva=20Mill=C3=A1n?= Date: Mon, 28 Aug 2023 17:12:02 +0200 Subject: [PATCH 1/2] Fix filter actions on data table vis cells MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eva Millán --- .../public/components/table_vis_component.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plugins/vis_type_table/public/components/table_vis_component.tsx b/src/plugins/vis_type_table/public/components/table_vis_component.tsx index c0e4ab61ae8b..3d7602e9a991 100644 --- a/src/plugins/vis_type_table/public/components/table_vis_component.tsx +++ b/src/plugins/vis_type_table/public/components/table_vis_component.tsx @@ -37,7 +37,7 @@ export const TableVisComponent = ({ event, uiState: { sort, setSort, colWidth, setWidth }, }: TableVisComponentProps) => { - const { rows, formattedColumns } = table; + const { rows, columns, formattedColumns } = table; const pagination = usePagination(visConfig, rows.length); @@ -59,7 +59,15 @@ export const TableVisComponent = ({ formattedColumns, ]); - const dataGridColumns = getDataGridColumns(table, event, colWidth); + const sortedTable = useMemo(() => { + return { + rows: sortedRows, + columns, + formattedColumns, + }; + }, [sortedRows, columns, formattedColumns]); + + const dataGridColumns = getDataGridColumns(sortedTable, event, colWidth); const sortedColumns = useMemo(() => { if ( From 22843e4301f7aee924b4b1a7e8adde8299ba9495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eva=20Mill=C3=A1n?= Date: Mon, 11 Sep 2023 17:51:31 +0200 Subject: [PATCH 2/2] Add changelog entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eva Millán --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45023cd6b092..3a36f8fcf641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [TSVB, Dashboards] Fix inconsistent dark mode code editor themes ([#4609](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4609)) - [Legacy Maps] Fix dark mode style overrides ([#4658](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4658)) - [BUG] Fix management overview page duplicate rendering ([#4636](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4636)) +- Fix filter actions on data table vis cells ([#4837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4837)) ### 🚞 Infrastructure