Skip to main content

Function: moveComparator()

moveComparator<T>(items, selected, moveDirection): (a, b) => number

Makes a sorting comparator (a function to pass to Array.sort()) which moves specified subset of items either to the beginning of the array or to the end.

Type Parameters

Type Parameter

T

Parameters

ParameterType

items

readonly T[]

selected

readonly T[]

moveDirection

"end" | "start"

Returns

Function

Parameters

ParameterType

a

T

b

T

Returns

number

Defined in

coreUtils/collections.ts:95