Skip to content

Commit

Permalink
[#635] Fix a bug where the modifier was not taken into account in Ods…
Browse files Browse the repository at this point in the history
…OutlinedTextField
  • Loading branch information
florentmaitre authored and paulinea committed Sep 22, 2023
1 parent cc23e4a commit ee9b626
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ee9b626

Please sign in to comment.