Skip to content

BlockSuite API Documentation / @blocksuite/affine-block-surface / sortIndex

Function: sortIndex()

sortIndex(a, b, groupIndexMap): -1 | 0 | 1

Parameters

a

a.id: string

a.index: string

b

b.id: string

b.index: string

groupIndexMap: Map<string, object>

Returns

-1 | 0 | 1

Defined in

packages/affine/block-surface/src/utils/sort.ts:52