Add Legend button under advanced search
This commit is contained in:
@@ -17,6 +17,7 @@ struct DictionaryView: View {
|
||||
|
||||
@State private var tokiInput: String = ""
|
||||
@State private var selectedPartOfSpeech: String?
|
||||
@State private var showGenericLegend: Bool = false
|
||||
@State private var advancedSearchEnabled = false
|
||||
@State var searchMode: SearchMode = .Dictionary
|
||||
|
||||
@@ -68,6 +69,13 @@ struct DictionaryView: View {
|
||||
}
|
||||
filterByInput()
|
||||
}
|
||||
Button(action: {
|
||||
print("Legend")
|
||||
showGenericLegend.toggle()
|
||||
}, label: {
|
||||
Text("Legend")
|
||||
})
|
||||
.padding(4)
|
||||
}
|
||||
.padding([.leading, .trailing], 8)
|
||||
}
|
||||
@@ -77,6 +85,9 @@ struct DictionaryView: View {
|
||||
.sheet(item: $selectedPartOfSpeech) { selectedPOS in
|
||||
PartsOfSpeechView(selectedPartOfSpeech: selectedPOS)
|
||||
}
|
||||
.sheet(isPresented: $showGenericLegend, content: {
|
||||
PartsOfSpeechView(selectedPartOfSpeech: nil)
|
||||
})
|
||||
.onChange(of: tokiInput) { newValue in
|
||||
filterByInput()
|
||||
//tokiDictViewModel.filterDictionaryEnglishMode(newValue)
|
||||
|
Reference in New Issue
Block a user