From 60cefc57a6e4ddc1f8640f8dfbd2074a803294fa Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 21 Aug 2024 15:47:27 -0500 Subject: [PATCH] pushed word change Signed-off-by: Matt Bruce --- MVMCoreUI/Atomic/Atoms/Selectors/Checkboxes.swift | 6 +++--- MVMCoreUI/Atomic/Atoms/Selectors/RadioButtons.swift | 6 +++--- MVMCoreUI/Atomic/Atoms/Selectors/RadioButtonsModel.swift | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/Checkboxes.swift b/MVMCoreUI/Atomic/Atoms/Selectors/Checkboxes.swift index 87a755a6..91040f77 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/Checkboxes.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/Checkboxes.swift @@ -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) } diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/RadioButtons.swift b/MVMCoreUI/Atomic/Atoms/Selectors/RadioButtons.swift index 683d28b3..bc41f8bb 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/RadioButtons.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/RadioButtons.swift @@ -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) } diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/RadioButtonsModel.swift b/MVMCoreUI/Atomic/Atoms/Selectors/RadioButtonsModel.swift index a71f0837..e3a89a21 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/RadioButtonsModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/RadioButtonsModel.swift @@ -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() } //--------------------------------------------------