Skip to content

Commit 4321b05

Browse files
authored
Merge pull request #453 from Esri/destiny/Fix-edit-button-bug
[Fix] Editing mode bug in favorites view
2 parents 15d5bb9 + c437f1d commit 4321b05

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Shared/Supporting Files/Views/FavoritesView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
import SwiftUI
1616

1717
struct FavoritesView: View {
18+
/// The editing mode of the environment.
19+
@Environment(\.editMode) private var editMode
20+
1821
/// A Boolean value indicating whether the add favorite sheet is showing.
1922
@State private var addFavoriteSheetIsShowing = false
2023

@@ -54,6 +57,9 @@ struct FavoritesView: View {
5457
}
5558
}
5659
}
60+
.onDisappear {
61+
editMode?.wrappedValue = .inactive
62+
}
5763
}
5864
}
5965

0 commit comments

Comments
 (0)