Post

Replies

Boosts

Views

Activity

Disclosure Group In a List
I'm converting a file viewer app to use SwiftUI. It uses an NSOutlineView to show the objects in the file and their component parts. DisclosureGroup seems like the thing to use. I have a List of DisclosureGroups, one for each of the top-level objects. The disclosure shows the component parts. This does not behave correctly. I've attached a little sample program that shows what I'm trying to do. I have built and run this little app on both macOS and iOS. It behaves differently and incorrectly on both platforms. I tried making the top-level view a VStack; that behaves better, but still doesn't do what I expect. DisclosureGroup_TestApp.swift - https://developer.apple.com/forums/content/attachment/8084981b-5d9d-4031-b5bb-62fddd655468 ContentView.swift - https://developer.apple.com/forums/content/attachment/c9a3a853-61c6-46af-99e2-f4a224297b8f
0
0
958
Jul ’20