Skip to content

Commit 9211f8c

Browse files
Merge pull request #31 from glints-dev/feat/checkbox-indextable
IndexTable: handle onMouse enter and leave
2 parents 396dfd3 + 3f281ab commit 9211f8c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'polaris-glints': minor
3+
---
4+
5+
IndexTable handle mouse enter

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)