Skip to content

Commit 0635e1b

Browse files
fix: interaction issue with eligibility table
1 parent 0419f1d commit 0635e1b

5 files changed

Lines changed: 12 additions & 11 deletions

File tree

src/app/components/table/data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export interface TableProps {
2828
dataTreeStartExpanded?: boolean;
2929
extraColumns?: ColumnDefinition[];
3030
dataTreeStartExpandedFn?: (row: RowComponent, level: number) => boolean;
31+
disableHover?: boolean;
3132
}
3233

3334
export const cellBGColorFormatter = (cell: CellComponent) => {

src/app/components/table/index.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,14 @@ export const Table: React.FC<TableProps> = (props: TableProps) => {
104104
"> .tabulator-cell:first-of-type": {
105105
// background: "#F1F3F5 !important",
106106
},
107-
"&:hover": {
108-
background: "#F6F7F7",
109-
borderColor: "#CFD4DA",
110-
},
107+
"&:hover": !props.disableHover
108+
? {
109+
background: "#F6F7F7 !important",
110+
"> div": {
111+
background: "#F6F7F7 !important",
112+
},
113+
}
114+
: {},
111115
},
112116
}}
113117
/>

src/app/pages/datasets/access-to-funding/blocks/block-2/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import get from "lodash/get";
33
import uniq from "lodash/uniq";
4+
import isEqual from "lodash/isEqual";
45
import Box from "@mui/material/Box";
56
import { appColors } from "app/theme";
67
import Tooltip from "@mui/material/Tooltip";
@@ -19,7 +20,6 @@ import {
1920
cellBGColorFormatter,
2021
TABLE_VARIATION_10_COLUMNS as ELIGIBILITY_TABLE_COLUMNS,
2122
} from "app/components/table/data";
22-
import isEqual from "lodash/isEqual";
2323

2424
interface AccessToFundingBlock2Props {
2525
filterGroups: FilterGroupModel[];
@@ -483,6 +483,7 @@ export const AccessToFundingBlock2: React.FC<AccessToFundingBlock2Props> = (
483483
</Box>
484484
<TableContainer
485485
dataTree
486+
disableHover
486487
search={tableSearch}
487488
id="eligibility-table"
488489
data={dataEligibilityTable}

src/app/pages/location/views/access-to-funding/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ export const AccessToFunding: React.FC = () => {
660660
</Box>
661661
<Table
662662
dataTree
663+
disableHover
663664
dataTreeStartExpanded
664665
id="eligibility-table"
665666
data={dataEligibilityTable}

src/index.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ input[type="text"] {
9696
background: #000;
9797
border-radius: 24px;
9898
}
99-
.tabulator-row:hover {
100-
background: #f6f7f7 !important;
101-
}
102-
.tabulator-row:hover > div {
103-
background: #f6f7f7 !important;
104-
}
10599
.tabulator-cell,
106100
.tabulator-col-title {
107101
font-size: 14px !important;

0 commit comments

Comments
 (0)