Skip to content

Commit

Permalink
[FEATURE] #117 : 항목 삭제 클릭 이벤트 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Mar 7, 2024
1 parent 6859012 commit 1a2f12d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ internal fun SurveyFormContent(
onPreviousButtonClicked: (SurveyFormState) -> Unit, // previousState
onNextButtonClicked: (SurveyFormState, SurveyFormState) -> Unit, // (currentState, nextState)
onAddQuestionButtonClicked: () -> Unit,
onDeleteQuestionButtonClicked: () -> Unit,
onRegisterButtonClicked: () -> Unit,
) {
AnimatedContent(
Expand Down Expand Up @@ -104,7 +105,8 @@ internal fun SurveyFormContent(
onQuestionTypeChanged(defaultQuestionType)
},
onQuestionChanged = onQuestionTitleChanged,
onAddSurveyQuestionButtonClicked = onAddQuestionButtonClicked,
onAddQuestionButtonClicked = onAddQuestionButtonClicked,
onDeleteQuestionButtonClicked = onDeleteQuestionButtonClicked,
currentQuestionNumber = currentQuestionNumber,
totalQuestionNumber = totalQuestionNumber,
onPreviousButtonClicked = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ internal fun SurveyFormEditScreen(

viewModel.setLastQuestion()
},
onDeleteQuestionButtonClicked = {
viewModel.deleteSurveyQuestion()
viewModel.setQuestion()
},
onDateChanged = viewModel::setSurveyDateDeadline,
onTimeChanged = { localTime -> viewModel.setSurveyTimeDeadline(localTime) },
onPreviousButtonClicked = { previousState -> // 이전 버튼
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ internal fun SurveyRegistrationScreen(

viewModel.setLastQuestion()
},
onDeleteQuestionButtonClicked = {
viewModel.deleteSurveyQuestion()
viewModel.setQuestion()
},
onDateChanged = viewModel::setSurveyDateDeadline,
onTimeChanged = { localTime -> viewModel.setSurveyTimeDeadline(localTime) },
onPreviousButtonClicked = { previousState -> // 이전 버튼
Expand Down

0 comments on commit 1a2f12d

Please sign in to comment.