mattmassicotte/stableview
A list implementation that can preserve position
Integration
dependencies: [
.package(url: "https://github.com/mattmassicotte/StableView", branch: "main")
]Usage
The position preservation system works via the scrollState binding.
struct AnchoredView: View {
let items = ["one", "two", "three"]
@State private var position: AnchoredListPosition<String>? = AnchoredListPosition(item: "two")
public var body: some View {
AnchoredList(items: items, position: $position) { item, row in
Text("item: \(item)")
}
}
}Contributing and Collaboration
I would love to hear from you! Issues or pull requests work great. Both a [Matrix space][matrix] and [Discord][discord] are available for live help, but I have a strong bias towards answering in the form of documentation. You can also find me on the web.
I prefer collaboration, and would love to find ways to work together if you have a similar project.
I prefer indentation with tabs for improved accessibility. But, I'd rather you use the system you want and make a PR than hesitate because of whitespace.
By participating in this project you agree to abide by the Contributor Code of Conduct.
[build status]: https://github.com/ChimeHQ/StableView/actions [build status badge]: https://github.com/ChimeHQ/StableView/workflows/CI/badge.svg [platforms]: https://swiftpackageindex.com/ChimeHQ/StableView [platforms badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmattmassicotte%2FStableView%2Fbadge%3Ftype%3Dplatforms [documentation]: https://swiftpackageindex.com/mattmassicotte/StableView/main/documentation [documentation badge]: https://img.shields.io/badge/Documentation-DocC-blue [matrix]: https://matrix.to/#/%23chimehq%3Amatrix.org [matrix badge]: https://img.shields.io/matrix/chimehq%3Amatrix.org?label=Matrix [discord]: https://discord.gg/esFpX6sErJ
Package Metadata
Repository: mattmassicotte/stableview
Default branch: main
README: README.md