Updated on 2026-08-14

This commit is contained in:
Tangem 2024-03-15 21:17:31 +05:00
parent 1f183f616a
commit 96fa67d0b1
7 changed files with 57 additions and 31 deletions

View file

@ -15,6 +15,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDirection
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
@ -74,7 +75,7 @@ fun AmountTextField(
},
modifier = modifier
.background(TangemTheme.colors.background.action),
textStyle = textStyle,
textStyle = textStyle.copy(textDirection = TextDirection.ContentOrLtr),
color = color,
keyboardOptions = keyboardOptions,
keyboardActions = keyboardActions,
@ -90,7 +91,7 @@ fun AmountTextField(
}
Text(
text = placeholder,
style = textStyle,
style = textStyle.copy(textDirection = TextDirection.ContentOrLtr),
color = TangemTheme.colors.text.disabled,
textAlign = placeholderTextAlign,
modifier = Modifier

View file

@ -67,9 +67,7 @@ fun SimpleTextField(
LaunchedEffect(key1 = isSelectionChanged) {
if (isSelectionChanged) {
textFieldValueState = textFieldValue.copy(
selection = getValueRange(value),
)
textFieldValueState = textFieldValue
}
}