implemented isEnabled

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-08-25 15:08:16 -05:00
parent 8489ba9085
commit 1c3dfca2d7
2 changed files with 18 additions and 0 deletions

View File

@ -37,6 +37,15 @@ open class SelectorGroupHandlerBase<HandlerType: Control>: Control, Changeable {
}
}
/// Whether this object is enabled or not
override open var isEnabled: Bool {
didSet {
selectorViews.forEach { handler in
handler.isEnabled = isEnabled
}
}
}
/// Current Surface and this is used to pass down to child objects that implement Surfacable.
override open var surface: Surface {
didSet {

View File

@ -103,6 +103,15 @@ open class ButtonGroup: View, UICollectionViewDataSource, UICollectionViewDelega
}
}
override open var isEnabled: Bool {
didSet {
buttons.forEach { button in
var b = button
b.isEnabled = isEnabled
}
}
}
/// Current Surface and this is used to pass down to child objects that implement Surfacable
override open var surface: Surface {
didSet {