Any advice on how to handle `focusProperties` on i...
# compose
r
Any advice on how to handle
focusProperties
on items within a
LazyList
? I'm trying to set a custom focus order by modifying the
next
focusRequester, but if the item is off-screen it will crash with
FocusRequester is not initialized
. This seems like a gotcha with focus within a LazyList -- am I wrong?
Copy code
val req = remember { FocusRequester() }
LazyList {
  item {
    Box(modifier = Modifier.focusProperties { next = req }.focusable())
  }
  // .. more items
  item {
    Box(modifier = Modifier.focusRequester(req).focusable())
  }
}