Skip to content

Commit

Permalink
possible fix for aheze#79
Browse files Browse the repository at this point in the history
  • Loading branch information
Sega-Zero committed Mar 18, 2023
1 parent 1c58050 commit 7ca8443
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Templates/Menu/Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ public extension Templates {
}
model.frames[itemID] = frame
}
.onValueChange(of: model.selectedItemID) { _, newValue in
if newValue == itemID {
.onChange(of: model.selectedItemID, do: { selectedID in
if selectedID == itemID {
action()
}
model.selectedItemID = nil
}
})
.onDisappear {
model.selectedItemID = nil
}
Expand Down

0 comments on commit 7ca8443

Please sign in to comment.