diff --git a/packages/sortable/src/hooks/useSortable.ts b/packages/sortable/src/hooks/useSortable.ts index 6560b8a6..789a5d43 100644 --- a/packages/sortable/src/hooks/useSortable.ts +++ b/packages/sortable/src/hooks/useSortable.ts @@ -64,7 +64,11 @@ export function useSortable({ ); const index = items.indexOf(id); const data = useMemo( - () => ({sortable: {containerId, index, items}, ...customData}), + () => ({sortable: {containerId, index, items}, + ...Object.create( + Object.getPrototypeOf(customData), + Object.getOwnPropertyDescriptors(customData), + )}), [containerId, customData, index, items] ); const itemsAfterCurrentSortable = useMemo(