Skip to content

Commit 5028c4f

Browse files
committed
Make it configurable
1 parent 7d64253 commit 5028c4f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

WooCommerce/Classes/ViewRelated/Products/Edit Product/ProductFormTableViewDataSource.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ private extension ProductFormTableViewDataSource {
208208
productStatus: productStatus,
209209
placeholder: placeholder,
210210
textViewMinimumHeight: 10.0,
211+
dismissOnReturn: true,
211212
isScrollEnabled: false,
212213
onNameChange: { [weak self] (newName) in self?.onNameChange?(newName) },
213214
style: .headline)

WooCommerce/Classes/ViewRelated/ReusableViews/LabeledTextViewTableViewCell.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ final class LabeledTextViewTableViewCell: UITableViewCell {
88
var productStatus: ProductStatus
99
var placeholder: String? = nil
1010
var textViewMinimumHeight: CGFloat? = nil
11+
var dismissOnReturn: Bool = false
1112
var isScrollEnabled: Bool = true
12-
var keyboardType: UIKeyboardType = .default
1313
var onNameChange: ((_ text: String) -> Void)? = nil
1414
var onTextDidBeginEditing: (() -> Void)? = nil
1515
var style: Style = .headline
@@ -33,8 +33,7 @@ final class LabeledTextViewTableViewCell: UITableViewCell {
3333
productTextField.isScrollEnabled = viewModel.isScrollEnabled
3434
productTextField.onTextChange = viewModel.onNameChange
3535
productTextField.onTextDidBeginEditing = viewModel.onTextDidBeginEditing
36-
productTextField.keyboardType = viewModel.keyboardType
37-
productTextField.dismissOnReturn = true
36+
productTextField.dismissOnReturn = viewModel.dismissOnReturn
3837
configureProductStatusLabel(productStatus: viewModel.productStatus)
3938
applyStyle(style: viewModel.style)
4039
}

0 commit comments

Comments
 (0)