Skip to content

Commit 6047761

Browse files
committed
update onChange when implicit value was passed to closures
1 parent d13fe55 commit 6047761

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

WooCommerce/Classes/POS/Presentation/TotalsView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ struct TotalsView: View {
7979
.onAppear {
8080
isShowingTotalsFields = shouldShowTotalsFields
8181
}
82-
.onChange(of: shouldShowTotalsFields, perform: hideTotalsFieldsWithDelay)
82+
.onChange(of: shouldShowTotalsFields) {
83+
hideTotalsFieldsWithDelay(shouldShowTotalsFields)
84+
}
8385
.geometryGroup()
8486
}
8587

WooCommerce/Classes/ViewRelated/Orders/Order Creation/CustomAmounts/AddCustomAmountPercentageView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ private extension AddCustomAmountPercentageView {
6565
text: $text,
6666
prompt: Text("0").foregroundColor(Color(.textSubtle))
6767
)
68-
.onChange(of: text, perform: onChangeText)
68+
.onChange(of: text) {
69+
onChangeText(text)
70+
}
6971
.focused()
7072
.focused($focusPercentageInput)
7173
.keyboardType(.decimalPad)

WooCommerce/Classes/ViewRelated/Orders/Order Creation/ProductsSection/DiscountLineDetailsView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ private extension DiscountLineDetailsView {
6464

6565
var body: some View {
6666
TextField(placeholder, text: $text)
67-
.onChange(of: text, perform: onChangeText)
67+
.onChange(of: text) {
68+
onChangeText(text)
69+
}
6870
.focused()
6971
.keyboardType(.numbersAndPunctuation)
7072
.frame(maxWidth: .infinity, minHeight: Layout.rowHeight)

0 commit comments

Comments
 (0)