Skip to content

Commit

Permalink
Fix primefaces#3803: Datatable error with datakey and virtualscroller
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Dec 20, 2022
1 parent 252f5d2 commit 7c5443a
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 7c5443a

Please sign in to comment.