Fixes text field recompositions because of new keyboard actions
This commit is contained in:
+1
-2
@@ -501,7 +501,7 @@ fun MyTextField(
|
|||||||
isError: Boolean = false,
|
isError: Boolean = false,
|
||||||
visualTransformation: VisualTransformation = VisualTransformation.None,
|
visualTransformation: VisualTransformation = VisualTransformation.None,
|
||||||
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
||||||
keyboardActions: KeyboardActions = KeyboardActions(),
|
keyboardActions: KeyboardActions = KeyboardActions.Default,
|
||||||
singleLine: Boolean = false,
|
singleLine: Boolean = false,
|
||||||
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
|
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
|
||||||
minLines: Int = 1,
|
minLines: Int = 1,
|
||||||
@@ -527,7 +527,6 @@ fun MyTextField(
|
|||||||
) {
|
) {
|
||||||
// COPIED FROM TEXT FIELD
|
// COPIED FROM TEXT FIELD
|
||||||
// The only change is the contentPadding below
|
// The only change is the contentPadding below
|
||||||
|
|
||||||
val textColor =
|
val textColor =
|
||||||
textStyle.color.takeOrElse {
|
textStyle.color.takeOrElse {
|
||||||
val focused by interactionSource.collectIsFocusedAsState()
|
val focused by interactionSource.collectIsFocusedAsState()
|
||||||
|
|||||||
Reference in New Issue
Block a user