This commit is contained in:
2023-02-14 01:50:41 +01:00
parent 324f8f45e8
commit 9595344e85

View File

@ -48,6 +48,18 @@ export interface DndListProps {
dataprops: DndListProps;
}
const reorder = ({ from, to }: { from: number; to: number })
{
const cloned = [...current];
const item = current[from];
cloned.splice(from, 1);
cloned.splice(to, 0, item);
return cloned;
};
export function DndList({dragEndHandler, dataprops}: IProps)
{
const {data} = dataprops;