Use `lowercased()` to fix Xcode autocomplete issue

This commit is contained in:
Max Desiatov 2020-12-06 14:21:12 +00:00
parent 8ad964c2f9
commit 37cdf6e454
No known key found for this signature in database
GPG Key ID: FE08EBF9CF58CBA2
2 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,7 @@ extension AnyHTML {
}
if !containsChecked && dom.ref.type == "checkbox" &&
dom.ref.tagName.string!.lowercased == "input"
dom.ref.tagName.string!.lowercased() == "input"
{
dom.ref.checked = .boolean(false)
}

View File

@ -20,6 +20,7 @@ public struct ToggleDemo: View {
public var body: some View {
VStack {
Toggle("Check me!", isOn: $checked)
Toggle("Toggle binding that should mirror the toggle above", isOn: $checked)
Toggle(isOn: Binding(get: { true }, set: { _ in })) {
Group { Text("Im always checked!").italic() }.foregroundColor(.red)
}