Skip to content

Commit db50681

Browse files
authored
Fix initial isPressed registration in KeyboardShortcutsExample (#191)
1 parent c3c361f commit db50681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Example/KeyboardShortcutsExample/MainScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private struct DynamicShortcut: View {
6666
.frame(maxWidth: 300)
6767
.padding()
6868
.padding(.bottom, 20)
69-
.onChange(of: shortcut) { oldValue, newValue in
69+
.onChange(of: shortcut, initial: true) { oldValue, newValue in
7070
onShortcutChange(oldValue: oldValue, newValue: newValue)
7171
}
7272
}

0 commit comments

Comments
 (0)