Skip to content

Commit

Permalink
added check before calling function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jialecl committed Sep 6, 2024
1 parent fb8d7fe commit 7da2893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lib/src/data-grid/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const DxcDataGrid = ({

const onRowsChange = (newRows: GridRow[] | HierarchyGridRow[] | ExpandableGridRow[]) => {
// call function to change rows, like when they have been edited
onGridRowsChange(newRows);
if (typeof onGridRowsChange === "function") onGridRowsChange(newRows);
};

const sortedRows = useMemo((): readonly GridRow[] => {
Expand Down

0 comments on commit 7da2893

Please sign in to comment.