You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function getTreeFromFlatData requires setting rootKey as null for it to work. However, the type of rootKey is set as string | number | undefined, resulting in a type error: Type 'null' is not assignable to type 'string | number | undefined'.ts(2322).
Can someone help to take a look?
code snippet:
const treeItems = await import("react-sortable-tree").then(treeLib => {
return treeLib.getTreeFromFlatData({
flatData,
getKey: node => node.id,
getParentKey: node => node.parentId,
// tslint:disable-next-line:no-null-keyword
rootKey: null // The value of the parent key when there is no parent (i.e., at root level)
});
The text was updated successfully, but these errors were encountered:
The function getTreeFromFlatData requires setting rootKey as null for it to work. However, the type of rootKey is set as string | number | undefined, resulting in a type error: Type 'null' is not assignable to type 'string | number | undefined'.ts(2322).
Can someone help to take a look?
code snippet:
The text was updated successfully, but these errors were encountered: