refactored
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
4399eef2d6
commit
0a10dbceb4
@ -104,13 +104,15 @@ class InputStepperViewController: BaseViewController<InputStepper> {
|
||||
maxValueTextField
|
||||
.numberPublisher
|
||||
.sink { [weak self] number in
|
||||
self?.component.maxValue = number?.intValue
|
||||
guard let number else { return }
|
||||
self?.component.maxValue = number.intValue
|
||||
}.store(in: &subscribers)
|
||||
|
||||
minValueTextField
|
||||
.numberPublisher
|
||||
.sink { [weak self] number in
|
||||
self?.component.minValue = number?.intValue
|
||||
guard let number else { return }
|
||||
self?.component.minValue = number.intValue
|
||||
}.store(in: &subscribers)
|
||||
|
||||
trailingTextField
|
||||
@ -223,18 +225,26 @@ class InputStepperViewController: BaseViewController<InputStepper> {
|
||||
component.labelText = "Quantity"
|
||||
component.helperText = "Add up to max lines."
|
||||
component.errorText = "You must choose a number of lines before advancing to the next step."
|
||||
component.defaultValue = 8
|
||||
component.defaultValue = nil
|
||||
component.trailingText = ""
|
||||
component.onChange = { component in
|
||||
if let text = component.value {
|
||||
print("inputStepper Change: \(text)")
|
||||
} else {
|
||||
print("inputStepper Change: check code")
|
||||
}
|
||||
}
|
||||
|
||||
trailingTextField.text = component.trailingText
|
||||
controlWidthTextField.text = ""
|
||||
errorTextField.text = component.errorText
|
||||
helperTextField.text = component.helperText
|
||||
labelTextField.text = component.labelText
|
||||
if let defaultVal = component.defaultValue as? Int {
|
||||
if let defaultVal = component.defaultValue {
|
||||
defaultValueField.text = String(defaultVal)
|
||||
}
|
||||
minValueTextField.text = String(component.minValue ?? 0)
|
||||
maxValueTextField.text = String(component.maxValue ?? 99)
|
||||
minValueTextField.text = String(component.minValue)
|
||||
maxValueTextField.text = String(component.maxValue)
|
||||
component.size = .large
|
||||
sizePickerSelectorView.text = "large"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user