# SyGridDropZoneInput

Fields, allowed values, and APIs that use SyGridDropZoneInput.

Canonical: https://grid.syidax.com/docs/types/SyGridDropZoneInput/

<a id="definition"></a>

## Type definition

A question mark (?) marks an optional field; readonly marks a value you should not change directly. A union (|) accepts one of the listed forms. Functions are callbacks that Grid invokes at the relevant point.

```typescript
export interface SyGridDropZoneInput {
  readonly id: string;
  readonly kind: 'grid' | 'external';
  readonly element?: HTMLElement | string;
  readonly grid?: HTMLElement;
  readonly accepting?: boolean;
  readonly schema?: {
    readonly id: string;
    readonly fields: ReadonlyArray<{ readonly field: string; readonly type: 'string' | 'number' | 'boolean' | 'date' | 'any'; readonly required: boolean }>;
    readonly allowExtraFields: boolean;
  };
  readonly permit?: (request: {
    readonly sourceZoneId: string;
    readonly targetZoneId: string;
    readonly mode: 'move' | 'copy';
    readonly rowKey: string;
    readonly row: unknown;
    readonly context: unknown;
  }) => { readonly allow: true } | { readonly allow: false; readonly detail: string };
  readonly adapt?: (row: unknown, sourceZoneId: string) => unknown;
  readonly consumes?: boolean;
  readonly mode?: 'move' | 'copy';
  readonly duplicateIds?: 'refuse' | 'skip' | 'replace';
  readonly atomicity?: 'all-or-nothing' | 'best-effort';
  readonly onDrop?: (target: unknown, commit: unknown) => void;
}
```

<a id="used-by"></a>

## APIs using this type

- [registerDropZone](https://grid.syidax.com/docs/methods/registerDropZone.md) — Registers a drop area for receiving rows and returns the registration result.

<a id="parents"></a>

## Contracts containing this type

- [SyGridImperativeMethods](https://grid.syidax.com/docs/types/SyGridImperativeMethods.md)
