From e6c55ef588ed7a0d627a48aac18c3ad26a057650 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 11 Aug 2022 09:54:58 -0500 Subject: [PATCH] update to add subscribers Signed-off-by: Matt Bruce --- .../SelectorBase/SelectorGroup.swift | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/VDS/Components/SelectorBase/SelectorGroup.swift b/VDS/Components/SelectorBase/SelectorGroup.swift index e98beaeb..3de39055 100644 --- a/VDS/Components/SelectorBase/SelectorGroup.swift +++ b/VDS/Components/SelectorBase/SelectorGroup.swift @@ -100,18 +100,38 @@ open class SelectorGroup SelectorType? { + if let index = model.selectors.firstIndex(where: { element in + return element.id == viewModel.id + }) { + return model.selectors[index] + } else { + return nil + } + } public func replace(viewModel: SelectorType){ if let index = model.selectors.firstIndex(where: { element in