From fca4c37253c3281a7db5ceb5daf4ec9b5910d79d Mon Sep 17 00:00:00 2001 From: Joel Keyser Date: Sun, 17 Nov 2024 12:12:34 -0600 Subject: [PATCH] touchup: apply nodesToHide to criteria table mainly so that right-click -> "hide node" is an alternative easy way to filter the table. --- src/web/topic/components/CriteriaTable/CriteriaTable.tsx | 8 ++++++-- src/web/view/components/Filter/GeneralFilters.tsx | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/web/topic/components/CriteriaTable/CriteriaTable.tsx b/src/web/topic/components/CriteriaTable/CriteriaTable.tsx index f33e83c6..379e11b9 100644 --- a/src/web/topic/components/CriteriaTable/CriteriaTable.tsx +++ b/src/web/topic/components/CriteriaTable/CriteriaTable.tsx @@ -213,8 +213,12 @@ export const CriteriaTable = () => { tableFilter, ); - const filteredSolutions = applyScoreFilter(selectedSolutions, generalFilter, scores); - const filteredCriteria = applyScoreFilter(selectedCriteria, generalFilter, scores); + const filteredSolutions = applyScoreFilter(selectedSolutions, generalFilter, scores).filter( + (node) => !generalFilter.nodesToHide.includes(node.id), + ); + const filteredCriteria = applyScoreFilter(selectedCriteria, generalFilter, scores).filter( + (node) => !generalFilter.nodesToHide.includes(node.id), + ); const tableData = buildTableCells(problemNode, filteredSolutions, filteredCriteria, edges); const [headerRow, ..._bodyRows] = tableData; diff --git a/src/web/view/components/Filter/GeneralFilters.tsx b/src/web/view/components/Filter/GeneralFilters.tsx index ed655562..66d2c6a3 100644 --- a/src/web/view/components/Filter/GeneralFilters.tsx +++ b/src/web/view/components/Filter/GeneralFilters.tsx @@ -75,6 +75,8 @@ export const GeneralFilters = () => { + + )}