Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix filter actions on data table vis cells #4837

Merged
merged 5 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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