added in didToggleAction

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-10-21 17:07:01 -05:00
parent 433b45a545
commit 3a3bbe05ea

View File

@ -25,6 +25,7 @@ open class Toggle: ToggleBase, VDSMoleculeViewProtocol {
public var viewModel: ToggleModel!
public var delegateObject: MVMCoreUIDelegateObject?
public var additionalData: [AnyHashable: Any]?
public var didToggleAction: ActionBlock?
//--------------------------------------------------
// MARK: - Initializers
@ -74,10 +75,12 @@ open class Toggle: ToggleBase, VDSMoleculeViewProtocol {
guard let viewModel else { return }
//sync the value on the viewModel
viewModel.selected = isOn
//tell the form you changed
_ = FormValidator.validate(delegate: self.delegateObject?.formHolderDelegate)
didToggleAction?()
if viewModel.action != nil || viewModel.alternateAction != nil {
var action: ActionModelProtocol?
if isOn {