Updated on 2026-08-14
This commit is contained in:
parent
c747f6f384
commit
088295ceaf
2 changed files with 7 additions and 19 deletions
|
|
@ -72,14 +72,12 @@ fun SimpleTextField(
|
|||
}
|
||||
|
||||
var lastTextValue by remember(value) {
|
||||
derivedStateOf {
|
||||
val isSelectionLastIndex = textFieldValueState.selection.end == textFieldValueState.text.lastIndex
|
||||
if (textFieldValueState.text.isBlank() || isSelectionLastIndex) {
|
||||
textFieldValueState = textFieldValueState.copy(
|
||||
text = value,
|
||||
selection = getValueRange(value),
|
||||
)
|
||||
}
|
||||
val isSelectionLastIndex = textFieldValueState.selection.end == textFieldValueState.text.lastIndex
|
||||
if (textFieldValueState.text.isBlank() || isSelectionLastIndex) {
|
||||
textFieldValueState = textFieldValueState.copy(
|
||||
text = value,
|
||||
selection = getValueRange(value),
|
||||
)
|
||||
}
|
||||
mutableStateOf(value)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue