Replies: 2 comments
-
Tested out your project, List(motherStore.scope(state: \.items, action: \.itemAction)) { itemStore in
Text(itemStore.name)
.id(itemStore.name) // this works
// .id(itemStore.id) // this doesn't work, because id: ObjectIdentifier
}
` |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @ckse93, I believe @alpaycli has figured out your problem here. You are using the name of the items to scroll to a row, yet you are using the store's identity to tag each row. If you want access to the state's ID rather than the store's, you can do Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi, I noticed that when making list cells, if you scope the elements from mother reducer, and provide child reducer, then ScrollViewProxy's scrollTo functionality does not work.
However if I replicate the same logic using raw data, where I generate child reducers from, scrollTo functionality works as expected.
here is the link to isolated bug showcase: https://github.com/ckse93/TCA-ScrollTo-bug-showcase
Checklist
main
branch of this package.Expected behavior
when
proxy.scrollTo()
is triggered, the scroll view should scroll to the elementActual behavior
No response
Reproducing project
TCA scrollTo.zip
github repo
The Composable Architecture version information
No response
Destination operating system
No response
Xcode version information
No response
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions