weasel API - v0.8.0
    Preparing search index...

    Interface CreateChildrenLayerOpts<TData>

    Options for createChildrenLayer.

    interface CreateChildrenLayerOpts<TData> {
        adapter: Pick<OrderedAdapter, "getChildren">;
        alwaysOn?: boolean;
        defaultVisible?: boolean;
        id?: string;
        label?: string;
        parentId?: string | (() => string | null) | null;
        drawChild(id: string, data: TData, view: View): DrawCommand[];
    }

    Type Parameters

    • TData
    Index

    Properties

    adapter: Pick<OrderedAdapter, "getChildren">

    Source of getChildren. Only the read side is used.

    alwaysOn?: boolean

    Forwarded to the produced RenderLayer.

    defaultVisible?: boolean

    Forwarded to the produced RenderLayer.

    id?: string

    Layer id for the visibility/order map. Default 'children'.

    label?: string

    Human-readable label. Default 'Children'.

    parentId?: string | (() => string | null) | null

    Parent id (null = root). Function form lets the layer follow a moving selection or focus. Default null.

    Methods