Skip to content

Commit

Permalink
Fix filter actions on data table vis cells (#4837) (#5000)
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 <evamillan@bitergia.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
(cherry picked from commit a925581)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 13, 2023
1 parent daeee75 commit 902148e
Showing 1 changed file with 10 additions and 2 deletions.
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 902148e

Please sign in to comment.