Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const handleColumnsReordered = (
oldIndex: number,
newIndex: number,
length: number
) => {
if (oldIndex === newIndex) {
return;
}
const nextChildren = Utils.reorderArray(
columns,
oldIndex,
newIndex,
length
);
setColumns(nextChildren);
};
private handleColumnsReordered = (oldIndex: number, newIndex: number, length: number) => {
if (oldIndex === newIndex) {
return;
}
const nextChildren = Utils.reorderArray(this.state.columns, oldIndex, newIndex, length);
this.setState({ columns: nextChildren });
};
private handleRowsReordered = (oldIndex: number, newIndex: number, length: number) => {
if (oldIndex === newIndex) {
return;
}
this.setState({ data: Utils.reorderArray(this.state.data, oldIndex, newIndex, length) });
};
}