Skip to content

Commit 6dff1ef

Browse files
author
Amelia Wattenberger
committed
fix: handle getCellIndicies when child is undefined
1 parent 97f7679 commit 6dff1ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/sticky-grid.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import tw from 'twin.macro';
66
import { FilterValue } from '../types';
77

88
function getCellIndicies(child) {
9-
return { row: child.props.rowIndex, column: child.props.columnIndex };
9+
return {
10+
row: child?.props.rowIndex || 0,
11+
column: child?.props.columnIndex || 0
12+
};
1013
}
1114

1215
function getShownIndicies(children) {

0 commit comments

Comments
 (0)