                 result.append(contentsOf: children[i].visibleChildren(collapseClosure))
             }
         }
-        
+
         return result
     }
 }

        let indexPaths = range.map { return IndexPath(row: $0, section: indexPath.section) }
        tableView.beginUpdates()
        if isCollapsed(viewModel) {
            tableView.insertRows(at: indexPaths, with: .automatic)
        } else {
            delegate?.collapsableTableViewDataSource(self, willHideCellsAt: indexPaths, at: tableView)
            tableView.deleteRows(at: indexPaths, with: .top)
        }
        toggleCollapse(viewModel)
        tableView.reloadRows(at: [indexPath], with: .none)

    
    private(set) var collapseInfo: Set<String> = [] //set of hash strings
    open var collapsedByDefault: Bool
    public var hasAnimation: Bool = false
    
    public init(items: [Item], collapsedByDefault: Bool) {
        self.collapsedByDefault = collapsedByDefault
