java.lang.IllegalStateException: Compose Runtime internal error. Unexpected or incorrect use of the Compose internal runtime API (Use active SlotWriter to determine anchor location instead). Please report to Google or use <https://goo.gle/compose-feedback>
When trying to focus my TextField when it's done loading.
My use case is I don't want to allow focus on my TextField until data has finished loading and at that point they can click into it and start typing.
isLoading is a boolean on my uiState that gets changed in the viewModel.
To me the above seems pretty intuitive. If we're not loading, then listen for isFocused changes and respond. I guess it gets tripped up when
isLoading
is true but you try to focus the TextField. That's when I get the crash. Is there a better way to do this?
c
Chuck Jazdzewski [G]
03/03/2022, 12:48 AM
This error almost always due to a bug in the Compose implementation, not how you are using it. Consider filing a bug with a repro project attached.
Chuck Jazdzewski [G]
03/03/2022, 12:50 AM
This particular error is probably due to a separate thread trying to invalidate the composition which was unsafe to do in 1.1 but I fixed in 1.2.
๐๐ผ 1
๐ 1
c
Chris Johnson
03/03/2022, 12:51 AM
I was wondering if it was something that would be fixed in a later version. I was going to try that next. Currently on 1.1.0-beta02. Let me try and upgrade and see if that helps. If not I'll file a bug, Thank you!
๐ 2
Chris Johnson
03/23/2022, 8:12 PM
Haven't had a chance to go back and check on this ๐ will try and update when I know more