Skip to content

Commit

Permalink
Style:art:: #32 Modify isEdit variable
Browse files Browse the repository at this point in the history
- List를 표시하기 위해 현재 검색어를 작성 중인지 판단하는 isEdit 변수의 이름을 isEditing으로 변경
  • Loading branch information
taek0622 committed Jun 2, 2023
1 parent 4800120 commit 0080a85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Nav/View/MapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct MapView: View {
private var mockDatas: [MockDatum] = MockDatum.allData

@State var searchQueryString = ""
@State var isEdit = false
@State var isEditing = false

// 서울 좌표
@State private var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 37.5666791, longitude: 126.9782914), span: MKCoordinateSpan(latitudeDelta: 0.5, longitudeDelta: 0.5))
Expand All @@ -27,7 +27,7 @@ struct MapView: View {
data in MapMarker(coordinate: data.coordinate)
}

if isEdit {
if isEditing {
List {
Text(searchQueryString)
}
Expand All @@ -40,7 +40,7 @@ struct MapView: View {
prompt: "검색"
)
.onChange(of: searchQueryString) { newValue in
isEdit = (newValue != "" ? true : false)
isEditing = (newValue != "" ? true : false)
}
}
}
Expand Down

0 comments on commit 0080a85

Please sign in to comment.