Questions tagged [swiftui-outlinegroup]

OutlineGroup is a tree shaped data rendering view of SwiftUI.

OutlineGroup is a tree shaped data rendering view of SwiftUI.

4 questions
10
votes
1 answer

How to make SwiftUI List/OutlineGroup lazy for use with large trees like a file system?

Here's a simple demo of the hierarchical List in SwiftUI. I'm testing it on macOS Big Sur, but unlike similar tree components in other UI toolkits, it asks for all its children immediately. So I can't use it for something like a file system…
Rob N
  • 15,024
  • 17
  • 92
  • 165
4
votes
0 answers

NavigationSplitView on macOS: OutlineGroup Elements in Sidebar not selectable

I have a simple Example of NavigationSplitView with different types in the Sidebar, including an OutlineGroup. Problem: OutlineGroup's parent nodes are selectable, child nodes (leafs) are not. Nodes without children also are not selectable. Target…
ChrisR
  • 9,523
  • 1
  • 8
  • 26
4
votes
4 answers

SwiftUI: How to get selections from OutlineGroup?

OutlineGroup is an analogue to NSOutlineView. NSOutlineView supports single/multiple node selection and we can obtain them by querying on NSOutlineView. Though obtaining selection on NSOutlineView is O(n), but this can be optimized to O(1) if the…
eonil
  • 83,476
  • 81
  • 317
  • 516
1
vote
0 answers

Changing the data in a SwiftUI OutlineGroup

I'm trying to use the new SwiftUI OutlineGroup to display an expandable tree. I tried this in my app's ContentView: struct ContentView: View { @EnvironmentObject var store: MyDataStore var body: some View { List { …
Rob N
  • 15,024
  • 17
  • 92
  • 165