Skip to main content

Adding unique ids to rows

Having a unique id on each row can be achieved using both the createRow and duplicateRow props.

Try deleting, creating, or duplicating rows:

ID
1
2
3
4
5
rows
<DataSheetGrid
createRow={() => ({ id: genId() })}
duplicateRow={({ rowData }) => ({ ...rowData, id: genId() })}
rowKey="id"
/>