@schema-render/search-table-react
Version:
Conditional search table component.
16 lines (15 loc) • 493 B
TypeScript
import { useSortable } from '@dnd-kit/sortable';
import type { FC, ReactNode } from 'react';
type ISortCtx = ReturnType<typeof useSortable>;
interface ISortableProps {
items: Array<{
id: string;
[key: string]: any;
}>;
itemClassName?: string;
overlayClassName?: string;
onChange?: (newItems: any[]) => void;
renderItem?: (item: any, index: number, sortCtx?: ISortCtx) => ReactNode;
}
declare const Sortable: FC<ISortableProps>;
export default Sortable;