I have created a variable called currentlySelectedJobId, this allows me to capture the job Id when the user has selected it elsewhere in my code.
When this happens i would like to scroll my LazyRow of items to this object.
LazyRow(state = scrollState) {
items(....
......
}
However I am struggling to see a way to capture the change of currentlySelectedJobId and perform the action scrollState.animateScrollToItem(index = 0)
Is there a way to do this ?