Skip to main content

SortByRule

Only a single sortBy rule can be active at one time. If any sortBy rules are provided and no specific rule is set, the first sortBy rule in the stack will be considered active.

The method uses lodash's orderBy under the hood.

sortByRule({
id: string;
sortFn: FinderPropertySelector<FItem> | FinderPropertySelector<FItem>[];
defaultSortDirection?: SortDirection;
label?: string;
hidden?: boolean;
})
PropDescriptionDefaultRequired
idEvery sortBy rule must have a unique string id.
sortFnA callback that returns a string or number. Note that it receives the Meta mixin, which can contain instance-wide arbitrary data.
defaultSortDirection'asc' or 'desc'.'asc'
labelOptional label for your client to display.
hiddenOptional display value for your client to display.false