From ee9b6267334754a85ed2c4d6d4254fec34732b3f Mon Sep 17 00:00:00 2001 From: Florent Maitre Date: Thu, 21 Sep 2023 11:48:34 +0200 Subject: [PATCH] [#635] Fix a bug where the modifier was not taken into account in OdsOutlinedTextField --- changelog.md | 1 + .../ods/compose/component/textfield/OdsOutlinedTextField.kt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 69feede2c..783bcc4eb 100644 --- a/changelog.md +++ b/changelog.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - \[Lib\] Fix a bug where `OdsDropdownMenu` was not dismissed on user click ([#617](https://github.com/Orange-OpenSource/ods-android/issues/617)) - \[Lib\] Fix disabled color of text and icon in `OdsDropdownMenu` ([#617](https://github.com/Orange-OpenSource/ods-android/issues/617)) - \[Lib\] Fix background color of components in dark mode ([#634](https://github.com/Orange-OpenSource/ods-android/issues/634)) +- \[Lib\] Fix a bug where the modifier was not taken into account in `OdsOutlinedTextField` ([#635](https://github.com/Orange-OpenSource/ods-android/issues/635)) ## [0.15.0](https://github.com/Orange-OpenSource/ods-android/compare/0.14.0...0.15.0) - 2023-09-12 diff --git a/lib/src/main/java/com/orange/ods/compose/component/textfield/OdsOutlinedTextField.kt b/lib/src/main/java/com/orange/ods/compose/component/textfield/OdsOutlinedTextField.kt index 16644f186..303474f70 100644 --- a/lib/src/main/java/com/orange/ods/compose/component/textfield/OdsOutlinedTextField.kt +++ b/lib/src/main/java/com/orange/ods/compose/component/textfield/OdsOutlinedTextField.kt @@ -52,15 +52,15 @@ internal fun OdsOutlinedTextField( maxLines: Int = Int.MAX_VALUE, characterCounter: (@Composable () -> Unit)? = null ) { - Column { + Column(modifier = modifier) { OutlinedTextField( + modifier = Modifier.fillMaxWidth(), value = if (singleLine) value.filter { it != '\n' } else value, onValueChange = { newValue -> if (!singleLine || !newValue.contains('\n')) { onValueChange(newValue) } }, - modifier = modifier, enabled = enabled, readOnly = readOnly, textStyle = OdsTheme.typography.subtitle1,