Skip to content

Commit b52c690

Browse files
authored
Merge pull request #7119 from woocommerce/issue/6651-auto-select-country-state
[Orders] Auto-confirm the selected country and state in the address form
2 parents d3c84c4 + a75eb3c commit b52c690

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
9.5
44
-----
5-
5+
- [*] Orders: The customer shipping/billing address form now navigates back automatically after selecting a country or state. [https://github.com/woocommerce/woocommerce-ios/pull/7119]
66

77
9.4
88
-----

WooCommerce/Classes/ViewRelated/Orders/Order Details/Address Edit/CountrySelectorCommand.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ final class CountrySelectorCommand: ObservableListSelectorCommand {
3131

3232
func handleSelectedChange(selected: Country, viewController: ViewController) {
3333
self.selected = selected
34+
viewController.navigationController?.popViewController(animated: true)
3435
}
3536

3637
func isSelected(model: Country) -> Bool {

WooCommerce/Classes/ViewRelated/Orders/Order Details/Address Edit/StateSelectorCommand.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ final class StateSelectorCommand: ObservableListSelectorCommand {
3131

3232
func handleSelectedChange(selected: StateOfACountry, viewController: ViewController) {
3333
self.selected = selected
34+
viewController.navigationController?.popViewController(animated: true)
3435
}
3536

3637
func isSelected(model: StateOfACountry) -> Bool {

0 commit comments

Comments
 (0)