Contents

init(filter:sort:order:animation:sectionBy:)

Creates a sectioned query sorted by a key path, grouped by an optional String key path. nil values share the empty-string section. Pass nil for the key path to disable sectioning.

Declaration

@MainActor @preconcurrency init<Value>(filter: Predicate<Element>? = nil, sort keyPath: KeyPath<Element, Value>, order: SortOrder = .forward, animation: Animation, sectionBy sectionKeyPath: KeyPath<Element, String?>? = nil) where Result == [Element], Value : Comparable

See Also

Creating a sorted, sectioned query