Skip to content

Commit

Permalink
Fix #3803: Datatable error with datakey and virtualscroller (#3805)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Dec 20, 2022
1 parent 252f5d2 commit 4a69929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/datatable/BodyCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const BodyCell = React.memo((props) => {

const getColumnProp = (prop) => (props.column ? props.column.props[prop] : null);
const field = getColumnProp('field') || `field_${props.index}`;
const editingKey = props.dataKey ? props.rowData[props.dataKey] || props.rowIndex : props.rowIndex;
const editingKey = props.dataKey ? (props.rowData && props.rowData[props.dataKey]) || props.rowIndex : props.rowIndex;

const [bindDocumentClickListener, unbindDocumentClickListener] = useEventListener({
type: 'click',
Expand Down

0 comments on commit 4a69929

Please sign in to comment.