https://github.com/composablehorizons/compose-textinput-bug
https://github.com/composablehorizons/compose-textinput-bug
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/composablehorizons/compose-textinput-bug
- Owner: composablehorizons
- Created: 2022-12-17T04:16:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-17T04:20:40.000Z (over 3 years ago)
- Last Synced: 2024-05-02T15:27:44.543Z (about 2 years ago)
- Language: Kotlin
- Homepage: https://www.composables.co/blog/state
- Size: 96.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jetpack Compose TextInput Bug
This repo reproduces a bug/behavior using Jetpack Compose while typing.
If there is any delay between typing and updating the text of a `TextField` then the text can be messed up if the text input is too fast.
A workaround for this is create a stateful version of `TextField` which keeps the text it needs to display, and notify the caller for updates to the text.
## Video demonstration
https://user-images.githubusercontent.com/1665273/208224437-011e138e-f15a-4751-9558-ecd4872f0857.mp4
For full implementation see [MainActivity.kt](https://github.com/Composables-co/compose-textinput-bug/blob/main/app/src/main/java/co/composables/textinputbug/MainActivity.kt)