Skip to content

Commit

Permalink
Fix initial isPressed registration in KeyboardShortcutsExample (#191
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cweider authored Nov 30, 2024
1 parent c3c361f commit db50681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Example/KeyboardShortcutsExample/MainScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private struct DynamicShortcut: View {
.frame(maxWidth: 300)
.padding()
.padding(.bottom, 20)
.onChange(of: shortcut) { oldValue, newValue in
.onChange(of: shortcut, initial: true) { oldValue, newValue in
onShortcutChange(oldValue: oldValue, newValue: newValue)
}
}
Expand Down

0 comments on commit db50681

Please sign in to comment.