Interface UseHeaderSelectionOptions

this hook manages the header selections.

TODO - When dragging a selection that already exist it should drag for reorder. (Not supported yet)

interface UseHeaderSelectionOptions {
    alwaysScrollToActiveCoords?: boolean;
    canSelectionSpanMergedCells?: ((start, end) => boolean);
    direction?: HeaderDirection;
    gridMainRef: MutableRefObject<GridElement>;
    gridRef: MutableRefObject<GridElement>;
    headerCount?: number;
    newSelectionMode?: NewHeaderSelectionMode;
    onDragEnd?: (() => void);
    onDragStart?: (() => void);
    onPointerUp?: ((e) => void);
    pointerDownInterceptor?: ((e, coords) => boolean);
    pointerMoveInterceptor?: ((e, coords) => boolean);
    selectionMain: SelectionResults;
    selectionPolicy?: SelectionPolicy;
}

Properties

alwaysScrollToActiveCoords?: boolean

scroll to active cell when

canSelectionSpanMergedCells?: ((start, end) => boolean)

Return true if the coordinate span can overlap merged ranges.

Type declaration

Returns

direction?: HeaderDirection

The direction the header is oriented

gridMainRef: MutableRefObject<GridElement>

Access grid functions

gridRef: MutableRefObject<GridElement>

Access grid functions

headerCount?: number

No of headers in the grid

newSelectionMode?: NewHeaderSelectionMode

New selection mode

onDragEnd?: (() => void)

Callback when drag ends

Type declaration

    • (): void
    • Returns void

onDragStart?: (() => void)

Callback when drag starts

Type declaration

    • (): void
    • Returns void

onPointerUp?: ((e) => void)

Pointer Up Listener

Type declaration

    • (e): void
    • Parameters

      • e: PointerEvent

      Returns void

pointerDownInterceptor?: ((e, coords) => boolean)

Pointerdown Interceptor

Type declaration

    • (e, coords): boolean
    • Parameters

      Returns boolean

pointerMoveInterceptor?: ((e, coords) => boolean)

Pointer Move Interceptor

Type declaration

    • (e, coords): boolean
    • Parameters

      Returns boolean

selectionMain: SelectionResults

The results of the selection

selectionPolicy?: SelectionPolicy

Selection policy