From 572a7dd1234365624761078636313a8bab058e72 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 30 Aug 2022 17:07:21 -0500 Subject: [PATCH] added valueChanged event Signed-off-by: Matt Bruce --- VDS/Components/RadioBox/RadioBoxGroup.swift | 1 + VDS/Components/RadioButton/RadioButtonGroup.swift | 1 + VDS/Components/RadioSwatch/RadioSwatchGroup.swift | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VDS/Components/RadioBox/RadioBoxGroup.swift b/VDS/Components/RadioBox/RadioBoxGroup.swift index 73b680b2..7295e220 100644 --- a/VDS/Components/RadioBox/RadioBoxGroup.swift +++ b/VDS/Components/RadioBox/RadioBoxGroup.swift @@ -22,6 +22,7 @@ public class RadioBoxGroup: Control, SelectorGroupSel if hasError, selectedModel != nil { hasError = false } + sendActions(for: .valueChanged) } } diff --git a/VDS/Components/RadioButton/RadioButtonGroup.swift b/VDS/Components/RadioButton/RadioButtonGroup.swift index f8152818..e1349329 100644 --- a/VDS/Components/RadioButton/RadioButtonGroup.swift +++ b/VDS/Components/RadioButton/RadioButtonGroup.swift @@ -22,6 +22,7 @@ public class RadioButtonGroup: Control, SelectorGr if hasError, selectedModel != nil { hasError = false } + sendActions(for: .valueChanged) } } diff --git a/VDS/Components/RadioSwatch/RadioSwatchGroup.swift b/VDS/Components/RadioSwatch/RadioSwatchGroup.swift index 2089d62b..9a97fab3 100644 --- a/VDS/Components/RadioSwatch/RadioSwatchGroup.swift +++ b/VDS/Components/RadioSwatch/RadioSwatchGroup.swift @@ -15,7 +15,11 @@ public class RadioSwatchGroup: Control, Changable // MARK: - Public Properties //-------------------------------------------------- @Proxy(\.model.selectedModel) - public var selectedModel: ModelHandlerType.ModelType? + public var selectedModel: ModelHandlerType.ModelType? { + didSet { + sendActions(for: .valueChanged) + } + } public var onChange: Blocks.ActionBlock?