struct ContentView: View {
   @State private var appData = ApplicationData.shared

   var body: some View {
      Table(of: Employees.self, columns: {
         TableColumn("Name", value: \.name)
         TableColumn("Position ", value: \.position)
      }, rows: {
         ForEach(appData.listOfEmployees) { employee in
            if employee.subordinates.isEmpty {
               TableRow(employee)
            } else {
               DisclosureTableRow(employee) {
                  ForEach(employee.subordinates)
               }
            }
         }
      })
   }
}