androidx.compose.ui.focus
focusRestorer
Function · from org.jetbrains.compose.ui:ui:1.12.2
No hand-written docs yet.
This modifier can be used to save and restore focus to a focus group. When focus leaves the focus group, it stores a reference to the item that was previously focused. Then when focus re-enters this focus group, it restores focus to the previously focused item.
Parameters
fun Modifier.focusRestorer(
fallback: FocusRequester = Default,
): Modifier
fallback: FocusRequesterOptionalSince 1.8
fallback: FocusRequesterOptionalSince 1.8Default: Default
A FocusRequester that is used when focus restoration fails to restore the initially focused item. For example, this might happen if the item is not available to be focused. The default value of FocusRequester.Default chooses the default focusable item.
Library docs
This modifier can be used to save and restore focus to a focus group. When focus leaves the focus group, it stores a reference to the item that was previously focused. Then when focus re-enters this focus group, it restores focus to the previously focused item.