Closed charlee-dev closed 1 year ago
Answered in the Slack channel, copying the solution here for anyone else who may have this issue:
I’ve seen similar issues to the problem, more generally, of managing TextField state in a StateFlow vs mutableStateOf. The typical solution is to use Dispatchers.Main.Immediate as the Dispatcher. Ballast currently uses Dispatchers.Default as the default for everything
Try adding this into the viewModel configuration, and see if it helps:
.dispatchers(
inputsDispatcher = Dispatchers.Main.immediate,
eventsDispatcher = Dispatchers.Main.immediate,
sideJobsDispatcher = Dispatchers.IO,
interceptorDispatcher = Dispatchers.Default
)
The thing to watch out for now is to make sure you’re not making API requests directly in the InputHandler without withContext(Dispatchers.IO)
Hi. I've got an issue with my text field adding extra characters. I checked it using mutableStateOf and it works as expected. Code related to the email below, nothing fancy...
in Contract
in Content
in Input
https://user-images.githubusercontent.com/20965327/218436652-e41fa81b-0ca5-439c-9400-a5802fb48cdd.mp4