Skip to content

Commit

Permalink
design: SusuTextFieldButton 커서 레이어 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
jinukeu committed Feb 8, 2024
1 parent 1f3e53e commit 836dc10
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ fun SusuTextFieldFillMaxButton(
modifier = Modifier.weight(1f),
contentAlignment = Alignment.Center,
) {
if (isSaved.not()) {
innerTextField()
}

/**
* Problem : innerTextField 수정 중에 saved가 되면 underline이 생기는 현상.
* Solution : saved 상태에서는 Text 컴포저블 함수가 보이게 함.
Expand Down Expand Up @@ -145,6 +141,10 @@ fun SusuTextFieldFillMaxButton(
minLines = minLines,
)
}

if (isSaved.not()) {
innerTextField()
}
}

InnerButtons(
Expand Down Expand Up @@ -213,6 +213,18 @@ fun SusuTextFieldWrapContentButton(
Box(
contentAlignment = Alignment.Center,
) {
if (text.isEmpty()) {
Text(
text = placeholder,
color = color.placeholderColor,
style = textStyle,
textAlign = TextAlign.Center,
overflow = overflow,
maxLines = maxLines,
minLines = minLines,
)
}

BasicTextField(
modifier = Modifier
.disabledHorizontalPointerInputScroll()
Expand Down Expand Up @@ -254,18 +266,6 @@ fun SusuTextFieldWrapContentButton(
innerTextField()
},
)

if (text.isEmpty()) {
Text(
text = placeholder,
color = color.placeholderColor,
style = textStyle,
textAlign = TextAlign.Center,
overflow = overflow,
maxLines = maxLines,
minLines = minLines,
)
}
}

InnerButtons(
Expand Down

0 comments on commit 836dc10

Please sign in to comment.