From 5828ee9692e02d07107a5eced5a2a001e910662f Mon Sep 17 00:00:00 2001 From: Yossi Saadi Date: Tue, 5 Mar 2024 17:07:53 +0200 Subject: [PATCH] fix(Table): do not set hovered to false when child element is clicked (sort button) --- .../Table/TableHeaderCell/TableHeaderCell.module.scss | 2 +- .../src/components/Table/TableHeaderCell/TableHeaderCell.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss b/packages/core/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss index 27fb74bb91..96c2cb7ec5 100644 --- a/packages/core/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss +++ b/packages/core/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss @@ -42,7 +42,7 @@ color: var(--primary-text-color); } - &:not(.show):not(:focus):not(:focus-visible) { + &:not(.show) { opacity: 0; pointer-events: none; } diff --git a/packages/core/src/components/Table/TableHeaderCell/TableHeaderCell.tsx b/packages/core/src/components/Table/TableHeaderCell/TableHeaderCell.tsx index 278af261e1..1a5030f218 100644 --- a/packages/core/src/components/Table/TableHeaderCell/TableHeaderCell.tsx +++ b/packages/core/src/components/Table/TableHeaderCell/TableHeaderCell.tsx @@ -50,7 +50,7 @@ const TableHeaderCell: VibeComponent = fo className={cx(styles.tableHeaderCell, { [styles.sortActive]: isSortActive }, className)} data-testid={dataTestId || getTestId(ComponentDefaultTestId.TABLE_HEADER_CELL, id)} role="columnheader" - onMouseEnter={() => setIsHovered(true)} + onMouseOver={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} onFocus={() => setIsHovered(true)} onBlur={() => setIsHovered(false)}