Created
August 22, 2021 14:32
-
-
Save Skyyo/11fd8d1d6e9394d83d571aef556b8f2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun CustomTextField( | |
inputWrapper: InputWrapper, | |
onValueChange: OnValueChange, | |
onImeKeyAction: OnImeKeyAction | |
) { | |
Column { | |
TextField( | |
value = inputWrapper.value, | |
onValueChange = { onValueChange(it) }, | |
isError = inputWrapper.errorId != null, | |
keyboardActions = KeyboardActions(onAny = { onImeKeyAction() }), | |
) | |
if (inputWrapper.errorId != null) { | |
Text() // error message | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment