Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
key: "description", record: new PropertyRecord({
value: description,
valueFormat: PropertyValueFormat.Primitive,
displayValue: description,
}, {
name: "description",
displayLabel: "description",
typename: "text",
}),
},
],
};
// if object has children, ie. is a non-leaf node of a tree, don't allow drop.
if (children !== undefined && children.length > 0) {
args.dropStatus = DropStatus.None;
return args;
}
const exists = dataProvider === demoMutableTableDataProvider;
if (args.row !== undefined) {
if (exists && args.dropEffect === DropEffects.Move) {
demoMutableTableDataProvider.moveRow(dragRow, args.row);
args.dropStatus = DropStatus.Drop;
args.local = true;
} else {
demoMutableTableDataProvider.insertRow(dragRow, args.row);
args.dropStatus = DropStatus.Drop;
}
} else if (!exists) {
demoMutableTableDataProvider.addRow(dragRow);
args.dropStatus = DropStatus.Drop;
}