Commit 5b1ca08a authored by Toby Brennan's avatar Toby Brennan
Browse files

Fix SwiftUI bug with workaround

parent c3a993d5
Showing with 3 additions and 3 deletions
+3 -3
......@@ -250,7 +250,7 @@ public struct ASTableView<SectionID: Hashable>: UIViewControllerRepresentable, C
}
}
withAnimation(parent.animateOnDataRefresh ? transaction?.animation : nil) {
refreshVisibleCells()
//refreshVisibleCells() //NOTE: MEMRI: Disabled due to an issue where the cell is refreshed during the wrong context -> wrong size
}
tableViewController.map { self.didUpdateContentSize($0.tableView.contentSize) }
}
......@@ -456,8 +456,8 @@ public struct ASTableView<SectionID: Hashable>: UIViewControllerRepresentable, C
if isEditing {
updateContent(tableView, transaction: nil)
} else {
parent.sections[safe: indexPath.section]?.dataSource.didSingleSelect(index: indexPath.item)
tableView.deselectRow(at: indexPath, animated: true)
parent.sections[safe: indexPath.section]?.dataSource.didSingleSelect(index: indexPath.item)
}
}
......@@ -499,7 +499,7 @@ public struct ASTableView<SectionID: Hashable>: UIViewControllerRepresentable, C
public func tableView(_ tableView: UITableView, willDeselectRowAt indexPath: IndexPath) -> IndexPath?
{
guard parent.sections[safe: indexPath.section]?.dataSource.shouldDeselect(indexPath) ?? false else
guard parent.sections[safe: indexPath.section]?.dataSource.shouldDeselect(indexPath) ?? true else
{
return nil
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment