feature/survey : 조사매물 PDF 번역 수정 및 컴포넌트 랜더링 이슈 해결 #124
@ -530,7 +530,7 @@ const MultiCheck = ({
|
||||
|
||||
/** 다중 선택 처리 */
|
||||
const handleCheckbox = (item: { id: number; code: string | null; name: string }) => {
|
||||
const isOtherSelected = Boolean(etcValue)
|
||||
const isOtherSelected = etcValue !== null
|
||||
let newValue: string[]
|
||||
|
||||
if (selectedValues.includes(item.code ?? String(item.id))) {
|
||||
@ -556,7 +556,7 @@ const MultiCheck = ({
|
||||
|
||||
if (isRoofMaterial) {
|
||||
/** 지붕 재료 기타 선택 포함 최대 2개 선택 처리 */
|
||||
if (selectedValues.length >= 2) {
|
||||
if (!isOtherSelected && selectedValues.length >= 2) {
|
||||
showErrorAlert(WARNING_MESSAGE.ROOF_MATERIAL_MAX_SELECT)
|
||||
setEtcValue(null)
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user