Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
ASCollectionView
Commits
5b1ca08a
Commit
5b1ca08a
authored
4 years ago
by
Toby Brennan
Browse files
Options
Download
Email Patches
Plain Diff
Fix SwiftUI bug with workaround
parent
c3a993d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sources/ASCollectionView/Implementation/ASTableView.swift
+3
-3
Sources/ASCollectionView/Implementation/ASTableView.swift
with
3 additions
and
3 deletions
+3
-3
Sources/ASCollectionView/Implementation/ASTableView.swift
+
3
-
3
View file @
5b1ca08a
...
...
@@ -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
)
??
fals
e
else
guard
parent
.
sections
[
safe
:
indexPath
.
section
]?
.
dataSource
.
shouldDeselect
(
indexPath
)
??
tru
e
else
{
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets