Skip to content

Commit

Permalink
Fix filter actions on data table vis cells (#4837)
Browse files Browse the repository at this point in the history
* Fix filter actions on data table vis cells
* Add changelog entry

---------

Signed-off-by: Eva Millán <[email protected]>
Signed-off-by: Josh Romero <[email protected]>
Co-authored-by: Miki <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: Anan Zhuang <[email protected]>
  • Loading branch information
4 people authored Sep 13, 2023
1 parent 17683e1 commit a925581
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Table Visualization] Fix width of multiple tables when rendered in column view ([#4638](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4638))
- [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))
- [Table Vis] Fix filter actions on data table vis cells ([#4837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4837))
- Fix broken app when management is turned off ([#4891](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4891))
- Correct the generated path for downloading plugins by their names on Windows ([#4953](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4953))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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 (
Expand Down

0 comments on commit a925581

Please sign in to comment.