feat: disable dnds for mobile
This commit is contained in:
@ -8,6 +8,7 @@ type Props = {
|
||||
id: number | string;
|
||||
itemStyle?: CSSProperties;
|
||||
dragHandleStyle?: CSSProperties;
|
||||
disabled?: boolean;
|
||||
};
|
||||
|
||||
const SortableItem = ({
|
||||
@ -15,6 +16,7 @@ const SortableItem = ({
|
||||
itemStyle,
|
||||
id,
|
||||
dragHandleStyle,
|
||||
disabled,
|
||||
}: PropsWithChildren<Props>) => {
|
||||
const {
|
||||
attributes,
|
||||
@ -24,7 +26,7 @@ const SortableItem = ({
|
||||
setActivatorNodeRef,
|
||||
transform,
|
||||
transition,
|
||||
} = useSortable({ id });
|
||||
} = useSortable({ id, disabled });
|
||||
|
||||
const context = useMemo(
|
||||
() => ({
|
||||
|
||||
Reference in New Issue
Block a user