Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying a snapshot near the bottom of a table view jumps its scroll position #42

Open
3 tasks done
rafaelnobrekz opened this issue Apr 11, 2023 · 0 comments
Open
3 tasks done

Comments

@rafaelnobrekz
Copy link

Checklist

  • This is not a Apple's bug.
  • Reviewed the README and documents.
  • Searched existing issues for ensure not duplicated.

Expected Behavior

On tableView didSelect delegate callback, I toggle the snapshot's Item isSelected property and apply a new snapshot with this data changed (otherwise selection would be lost when reusing cells, as the selection is set in my cell provider from the item)
When using the native UITableViewDiffableDataSource, the table view remains at the same content offset no matter where I apply the snapshot from.

Current Behavior

When using DiffableDataSource's TableViewDiffableDataSource, and the tableview's bottommost rows are visible, the scrolling position is offset after applying a snapshot

Reproducible Demo Project

https://github.com/rafaelnobrekz/DiffableDataSourceOffsetBug

Environments

  • version: 0.5

  • Swift version: 5.5

  • iOS version: 11-16

  • Xcode version: 14.2

  • Devices/Simulators:

  • CocoaPods/Carthage version:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant