From fa3b55cb61e057c319379bf2a9cf775158b17901 Mon Sep 17 00:00:00 2001 From: AbhiramTadepalli Date: Sun, 10 Nov 2024 13:56:33 -0600 Subject: [PATCH] Add tooltip when hovering on search result name --- .../SearchResultsTable/searchResultsTable.tsx | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/components/common/SearchResultsTable/searchResultsTable.tsx b/src/components/common/SearchResultsTable/searchResultsTable.tsx index 27a01a61..58069622 100644 --- a/src/components/common/SearchResultsTable/searchResultsTable.tsx +++ b/src/components/common/SearchResultsTable/searchResultsTable.tsx @@ -159,15 +159,29 @@ function Row({ - - {searchQueryLabel(course) + - ((typeof course.profFirst === 'undefined' && - typeof course.profLast === 'undefined') || - (typeof course.prefix === 'undefined' && - typeof course.number === 'undefined') - ? ' (Overall)' - : '')} - + b.tagCount - a.tagCount) + .slice(0, 3) + .map((tag) => tag.tagName) + .join(', ') + : 'No Tags Available' + } + placement="top" + > + + {searchQueryLabel(course) + + ((typeof course.profFirst === 'undefined' && + typeof course.profLast === 'undefined') || + (typeof course.prefix === 'undefined' && + typeof course.number === 'undefined') + ? ' (Overall)' + : '')} + + {((typeof grades === 'undefined' || grades.state === 'error') && (