i have an UI for assigning a UserRole.
the list of user roles is queried from the DB (flow) and exposed as a uiState in the ViewModel.
the selected role is a mutable state
Copy code
private var currentRoleSelection = mutableStateOf<UserRole>(null)
i want to have a initial selection for
currentRoleSelection
(let's say the first role in the list)
but i have to wait for the userRoles to be queried from the DB