Skip to content

Commit

Permalink
[MOD/#309] 체크박스 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Dec 20, 2024
1 parent d68a2eb commit 4222935
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fun HomeFilteringBottomSheet(
var isYearNull by remember { mutableStateOf(false) }
var isMonthNull by remember { mutableStateOf(false) }
// todo: year와 month의 서버통신 값이 null이면 true로 넣어주세요!
var isCheck by remember { mutableStateOf(false) }
var isCheckBoxChecked by remember { mutableStateOf(false) }

var isFirstNullAndFirstChange by remember { mutableStateOf(false) }

Expand Down Expand Up @@ -154,17 +154,15 @@ fun HomeFilteringBottomSheet(
.padding(horizontal = 24.dp)
)

//todo: 예시 체크박스로, 추후 수정 부탁합니다!
//todo: 아래는 예시 체크박스로, 추후 수정 부탁합니다!
Checkbox(
checked = isCheck,
checked = isCheckBoxChecked,
onCheckedChange = { isChecked ->
if (isChecked) {
isYearNull = true
isMonthNull = true
isCheck = true
} else {
isCheck = false
}
isCheckBoxChecked = isChecked
},
modifier = Modifier.padding(start = 20.dp)
)
Expand All @@ -176,15 +174,15 @@ fun HomeFilteringBottomSheet(
onYearChosen = { year, isFirst ->
if (year != null) {
currentStartYear = year
isCheck = false
isCheckBoxChecked = false
isYearNull = false
isFirstNullAndFirstChange = isFirst
}
},
onMonthChosen = { month, isFirst ->
if (month != null) {
currentStartMonth = month
isCheck = false
isCheckBoxChecked = false
isMonthNull = false
isFirstNullAndFirstChange = isFirst
}
Expand Down

0 comments on commit 4222935

Please sign in to comment.