Skip to content

Commit 188530f

Browse files
IndexTable: handle onMouse enter and leave
1 parent 396dfd3 commit 188530f

File tree

1 file changed

+8
-1
lines changed
  • polaris-react/src/components/IndexTable/components/Row

1 file changed

+8
-1
lines changed

polaris-react/src/components/IndexTable/components/Row/Row.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export interface RowProps {
2424
onNavigation?(id: string): void;
2525
onClick?(): void;
2626
checkbox?: React.ReactNode;
27+
onMouseEnterCheckboxCell?(): void;
2728
}
2829

2930
export const Row = memo(function Row({
@@ -37,6 +38,7 @@ export const Row = memo(function Row({
3738
onNavigation,
3839
onClick,
3940
checkbox,
41+
onMouseEnterCheckboxCell,
4042
}: RowProps) {
4143
const {selectable, selectMode, condensed} = useIndexRow();
4244
const onSelectionChange = useIndexSelectionChange();
@@ -143,7 +145,12 @@ export const Row = memo(function Row({
143145
const RowWrapper = condensed ? 'li' : 'tr';
144146

145147
const checkboxMarkup = selectable ? (
146-
<td className="Polaris-IndexTable__TableCell">{checkbox}</td>
148+
<td
149+
className="Polaris-IndexTable__TableCell"
150+
onMouseEnter={onMouseEnterCheckboxCell}
151+
>
152+
{checkbox}
153+
</td>
147154
) : null;
148155

149156
return (

0 commit comments

Comments
 (0)