pushed word change
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
9185e185fd
commit
60cefc57a6
@ -46,9 +46,9 @@ open class Checkboxes: VDS.CheckboxGroup, VDSMoleculeViewProtocol {
|
||||
open override func didSelect(_ selectedControl: CheckboxItem) {
|
||||
super.didSelect(selectedControl)
|
||||
|
||||
// since the boxes has the state being tracked, we need to update the values here.
|
||||
if let index = items.firstIndex(where: {$0 === selectedControl}), let selectedBox = checkboxes?[index] {
|
||||
selectedBox.checkbox.selected = true
|
||||
// since the checkboxes has the state being tracked, we need to update the values here.
|
||||
if let index = items.firstIndex(where: {$0 === selectedControl}), let selected = checkboxes?[index] {
|
||||
selected.checkbox.selected = true
|
||||
}
|
||||
_ = FormValidator.validate(delegate: delegateObject?.formHolderDelegate)
|
||||
}
|
||||
|
||||
@ -44,10 +44,10 @@ open class RadioButtons: VDS.RadioButtonGroup, VDSMoleculeViewProtocol {
|
||||
open override func didSelect(_ selectedControl: RadioButtonItem) {
|
||||
super.didSelect(selectedControl)
|
||||
|
||||
// since the boxes has the state being tracked, we need to update the values here.
|
||||
if let index = items.firstIndex(where: {$0 === selectedControl}), let selectedBox = radioButtons?[index] {
|
||||
// since the radiobutton has the state being tracked, we need to update the values here.
|
||||
if let index = items.firstIndex(where: {$0 === selectedControl}), let selected = radioButtons?[index] {
|
||||
radioButtons?.forEach { $0.radioButton.state = false }
|
||||
selectedBox.radioButton.state = true
|
||||
selected.radioButton.state = true
|
||||
}
|
||||
_ = FormValidator.validate(delegate: delegateObject?.formHolderDelegate)
|
||||
}
|
||||
|
||||
@ -26,8 +26,8 @@ public class RadioButtonsModel: FormFieldModel {
|
||||
/// Returns the fieldValue of the selected RadioButton.
|
||||
public override func formFieldValue() -> AnyHashable? {
|
||||
guard enabled else { return nil }
|
||||
let selectedBox = radioButtons.first { $0.radioButton.state }
|
||||
return selectedBox?.radioButton.formFieldValue()
|
||||
let selected = radioButtons.first { $0.radioButton.state }
|
||||
return selected?.radioButton.formFieldValue()
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user