instead of `hasScrollToKeyAction`*?* Or if that is what you're intending, then maybe using
performScrollToKey
instead of
performScrollToIndex
is what you need.
j
Jelle Fresen [G]
06/28/2021, 1:30 PM
performScrollToKey
and
performScrollToIndex
are meant to be used on lazy lists, such as LazyColumn and LazyRow. They require that the content of the scrolling container respectively has keys and indices associated to them. In a plain column with a scrollable modifier, the content is just one big blob of content, and you'll have to use
performScrollTo
on the node you intend to bring into view:
Copy code
val matcher = /* matcher that matches the content you want to scroll to */
testRule.onNode(matcher).performScrollTo()