File tree Expand file tree Collapse file tree 3 files changed +2
-10
lines changed
WooCommerce/Classes/ViewRelated Expand file tree Collapse file tree 3 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ struct OrderFormPresentationWrapper: View {
139139 } ,
140140 secondaryView: { isShowingProductSelector in
141141 if let productSelectorViewModel = viewModel. productSelectorViewModel {
142- ProductSelectorView ( configuration: . loadConfiguration( for: horizontalSizeClass) ,
142+ ProductSelectorNavigationView ( configuration: . loadConfiguration( for: horizontalSizeClass) ,
143143 isPresented: isShowingProductSelector,
144144 viewModel: productSelectorViewModel)
145145 . sheet ( item: $viewModel. productToConfigureViewModel) { viewModel in
Original file line number Diff line number Diff line change @@ -15,12 +15,11 @@ struct ProductSelectorNavigationView: View {
1515 }
1616
1717 var body : some View {
18- NavigationView {
18+ NavigationStack {
1919 ProductSelectorView ( configuration: configuration,
2020 isPresented: $isPresented,
2121 viewModel: viewModel)
2222 }
23- . navigationViewStyle ( . stack)
2423 . wooNavigationBarStyle ( )
2524 }
2625}
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ struct ProductVariationSelectorView: View {
1515
1616 private let onMultipleSelections : ( ( [ Int64 ] ) -> Void ) ?
1717
18- @State private var hasSentSelectionOnDismiss = false
19-
2018 /// Tracks the state for the 'Clear Selection' button
2119 ///
2220 private var isClearSelectionDisabled : Bool {
@@ -103,11 +101,6 @@ struct ProductVariationSelectorView: View {
103101 . accessibilityLabel ( Localization . backButtonAccessibilityLabel)
104102 }
105103 }
106- . onDisappear {
107- guard !hasSentSelectionOnDismiss else { return }
108- hasSentSelectionOnDismiss = true
109- onMultipleSelections ? ( viewModel. selectedProductVariationIDs)
110- }
111104 . onAppear {
112105 viewModel. onLoadTrigger. send ( )
113106 }
You can’t perform that action at this time.
0 commit comments