realm-swift icon indicating copy to clipboard operation
realm-swift copied to clipboard

@ObservedSectionedResults too restrictive

Open ayrtonsoftware opened this issue 1 year ago • 0 comments

Discussed in https://github.com/realm/realm-swift/discussions/8360

Originally posted by ayrtonsoftware September 13, 2023 If I use sectioned results in a view, it works for only a small number of scenarios:

@ObservedSectionedResults(Fact.self, sectionKeyPath: \.category, filter: NSPredicate(format: "parent = nil")) var cats

But I need to pass in a Results<Fact>, the section key path, and a filter to get the next view I want. This does not seem possible.

ayrtonsoftware avatar Sep 16 '23 19:09 ayrtonsoftware