Skip to content

Commit

Permalink
bug: add missing idSynonym
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed Feb 14, 2022
1 parent 5479118 commit 027becc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/data-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class DataManager {
}
if (process.env.NODE_ENV === 'development' && !this.checkForId) {
this.checkForId = true;
if (data.some((d) => d.id === undefined)) {
if (data.some((d) => d[idSynonym] === undefined)) {
console.warn(
'The table requires all rows to have an unique id property. A row was provided without id in the rows prop. To prevent the loss of state between renders, please provide an unique id for each row.'
);
Expand Down

0 comments on commit 027becc

Please sign in to comment.