diff --git a/chiptextfield-core/src/commonMain/kotlin/com/dokar/chiptextfield/BasicChipTextField.kt b/chiptextfield-core/src/commonMain/kotlin/com/dokar/chiptextfield/BasicChipTextField.kt index b98a3a3..eb4c04e 100644 --- a/chiptextfield-core/src/commonMain/kotlin/com/dokar/chiptextfield/BasicChipTextField.kt +++ b/chiptextfield-core/src/commonMain/kotlin/com/dokar/chiptextfield/BasicChipTextField.kt @@ -597,12 +597,8 @@ private fun Input( BasicTextField( value = value, - onValueChange = filterNewLines { newValue, hasNewLine -> - if (hasNewLine && newValue.text.isNotEmpty() && tryAddNewChip(newValue)) { - onValueChange(TextFieldValue()) - } else { - onValueChange(newValue) - } + onValueChange = filterNewLines { newValue, _ -> + onValueChange(newValue) }, modifier = modifier .focusRequester(focusRequester) @@ -623,6 +619,7 @@ private fun Input( }, enabled = enabled, readOnly = readOnly, + singleLine = true, textStyle = textStyle.copy(color = textColor), keyboardOptions = keyboardOptions.copy(imeAction = ImeAction.Done), keyboardActions = KeyboardActions(