Skip to content

Commit

Permalink
Pass rowIdx to renderCell (#3359)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanmahajan7 authored Oct 11, 2023
1 parent 4fab9bb commit 095fbb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function Cell<R, SR>({
{column.renderCell({
column,
row,
rowIdx,
isCellEditable: isEditable,
tabIndex: childTabIndex,
onRowChange: handleRowChange
Expand Down
1 change: 1 addition & 0 deletions src/EditCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default function EditCell<R, SR>({
column.renderCell({
column,
row,
rowIdx,
isCellEditable: true,
tabIndex: -1,
onRowChange: onEditorRowChange
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export interface Position {
export interface RenderCellProps<TRow, TSummaryRow = unknown> {
column: CalculatedColumn<TRow, TSummaryRow>;
row: TRow;
rowIdx: number;
isCellEditable: boolean;
tabIndex: number;
onRowChange: (row: TRow) => void;
Expand Down

0 comments on commit 095fbb0

Please sign in to comment.