테이블 간 이동·충돌 옵션
같은 coordinator 객체·scope를 공유하고 서로 다른 tableId를 가진 테이블 사이의 이동입니다. coordinator는 데이터를 소유하지 않으며 source와 target의 새 상태를 한 번의 애플리케이션 갱신으로 함께 반영해야 합니다.
조합과 충돌 정책
섹션 제목: “조합과 충돌 정책”Flat → Flat, Grouped → Grouped만 지원합니다. Tree·Viewport·columnFiltering·infiniteScroll·lazyLoad와 결합하지 않습니다. Grouped 행의 소속 변경에는 대상 setRowGroupId가 필요합니다. 선택·행 상세·그룹 펼침 상태는 자동 이전하지 않습니다.
대상 테이블이 canTransfer와 resolveConflict를 소유합니다. 중복 ID는 기본 reject이며 undefined/잘못된 반환값도 reject입니다. overwrite는 대상의 같은 ID 행을 교체합니다. 그룹 overwrite는 대상 그룹과 모든 멤버를 제거하고 원본 그룹 묶음을 삽입하며 병합하지 않습니다.
coordinator와 scope를 공유하지 않거나 tableId 중복 등록, stale/unmounted 대상, ID 변경 등으로 유효하지 않으면 성공 알림이 없습니다. 부모 상태 연결 코드와 순수 이동 함수를 참고하십시오.
CominsTableTransferConfig
섹션 제목: “CominsTableTransferConfig”coordinator
섹션 제목: “coordinator”coordinator: CominsTableTransferCoordinator<TData, TGroup>;필수. factory가 만든 동일 객체를 참여 테이블들이 공유합니다. 렌더마다 새로 만들지 마십시오.
scope
섹션 제목: “scope”scope: string;필수. 비어 있지 않은 이동 범위 문자열입니다. 다른 scope로 이동하지 않습니다.
tableId
섹션 제목: “tableId”tableId: string;필수. scope 안의 고유하고 비어 있지 않은 테이블 ID입니다.
canTransfer
섹션 제목: “canTransfer”canTransfer?: (intent: CominsTableTransferIntent<TData, TGroup>) => boolean;대상 측 동기 허용 함수입니다. 미지정 시 다른 조건을 통과한 이동을 허용합니다. false 거절은 duplicate-id 거절 알림을 만들지 않습니다.
resolveConflict
섹션 제목: “resolveConflict”resolveConflict?: CominsTableTransferConflictResolver<TData, TGroup>;대상 중복 ID 처리 함수입니다. 기본 reject이며 overwrite는 명시할 때만 사용합니다.
rejectionFeedback
섹션 제목: “rejectionFeedback”rejectionFeedback?: false | CominsTableTransferRejectionFeedback<TData, TGroup>;기본 중복 거절 툴팁·outline을 표시합니다. false로 끄거나 duration/renderTooltip을 설정합니다. onTransferRejected는 별개입니다.
CominsTableTransferCoordinatorOptions
섹션 제목: “CominsTableTransferCoordinatorOptions”onTransfer
섹션 제목: “onTransfer”onTransfer: (result: CominsTableTransferResult<TData, TGroup>) => void;필수. 한 번의 성공 결과에 source/target 새 모델을 모두 받습니다. 둘을 같은 부모 상태 갱신에서 반영합니다.
onTransferRejected
섹션 제목: “onTransferRejected”onTransferRejected?: (rejection: CominsTableTransferRejection<TData, TGroup>) => void;기본 콜백 없음. pointer drop의 확정된 duplicate-id 거절을 알립니다. 순수 helper의 null 반환에는 호출되지 않습니다.
CominsTableTransferRejectionFeedback
섹션 제목: “CominsTableTransferRejectionFeedback”duration
섹션 제목: “duration”duration?: number;기본 1800ms. 표시 시간은 500~10000ms 범위입니다.
renderTooltip
섹션 제목: “renderTooltip”renderTooltip?: (rejection: CominsTableTransferRejection<TData, TGroup>) => React.ReactNode;중복 거절의 툴팁 본문을 반환합니다. 미지정 시 기본 Duplicate ID 안내입니다.
createCominsTableTransferCoordinator
섹션 제목: “createCominsTableTransferCoordinator”export declare function createCominsTableTransferCoordinator<TData, TGroup = never>(options: CominsTableTransferCoordinatorOptions<TData, TGroup>): CominsTableTransferCoordinator<TData, TGroup>;comins-table에서 import합니다. options.onTransfer는 필수입니다. branded coordinator를 반환하며 소비자가 객체를 직접 만들어 대체하지 않습니다. 테이블 등록/해제는 컴포넌트가 처리하고 공개 coordinator 타입에는 destroy 메서드가 없습니다.
CominsTableTransferIntent
섹션 제목: “CominsTableTransferIntent”export type CominsTableTransferIntent<TData, TGroup> = { kind: "row"; row: TData; sourceRowId: CominsRowId; sourceTableId: string; targetGroupId?: CominsRowId; targetRowId?: CominsRowId; targetTableId: string;} | { group: TGroup; kind: "group"; rows: readonly TData[]; sourceGroupId: CominsRowId; sourceTableId: string; targetGroupId?: CominsRowId; targetTableId: string;};kind: row는 이동 행과 sourceRowId, kind: group은 그룹과 멤버 rows/sourceGroupId입니다. 양쪽 tableId는 필수이고 대상 row/group ID는 실제 목적지에 따라 생략됩니다.
CominsTableTransferConflict
섹션 제목: “CominsTableTransferConflict”export type CominsTableTransferConflict<TData, TGroup> = { kind: "row"; rowId: CominsRowId; source: CominsTableTransferRowEndpoint<TData>; target: CominsTableTransferRowEndpoint<TData>;} | { groupId: CominsRowId; kind: "group"; source: CominsTableTransferGroupEndpoint<TData, TGroup>; target: CominsTableTransferGroupEndpoint<TData, TGroup>;};kind: row이면 같은 rowId를 가진 source/target 행, group이면 같은 groupId의 그룹과 멤버를 비교합니다.
CominsTableTransferConflictResolver
섹션 제목: “CominsTableTransferConflictResolver”export type CominsTableTransferConflictResolver<TData, TGroup> = (conflict: CominsTableTransferConflict<TData, TGroup>) => CominsTableTransferConflictPolicy | undefined;동기적으로 reject/overwrite 또는 undefined를 반환합니다. undefined는 reject입니다.
CominsTableTransferRejection
섹션 제목: “CominsTableTransferRejection”export type CominsTableTransferRejection<TData, TGroup = never> = { conflict: CominsTableTransferConflict<TData, TGroup>; kind: "group" | "row"; reason: "duplicate-id"; sourceTableId: string; targetTableId: string;};reason은 duplicate-id입니다. conflict는 실제 거절된 충돌, kind는 이동 종류이며 충돌 종류와 구분합니다.
관련 API
섹션 제목: “관련 API”tooltip
섹션 제목: “tooltip”tooltip?: { render?: (rejection: CominsTableTransferRejection<TData, TGroup>) => React.ReactNode; };표준 렌더링 경로와 반환값은 0.2.2 전환 가이드를 참고하십시오.