reverted back to onClick() since I found the issue in reset()
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
09886ffe26
commit
973e25034e
@ -157,13 +157,11 @@ open class Toggle: Control, Changeable, FormFieldable {
|
||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||
open override func setup() {
|
||||
super.setup()
|
||||
|
||||
publisher(for: .touchUpInside)
|
||||
.sink(receiveValue: { [weak self] _ in
|
||||
guard let self, isEnabled else { return }
|
||||
toggle()
|
||||
})
|
||||
.store(in: &subscribers)
|
||||
|
||||
onClick = { [weak self] _ in
|
||||
guard let self else { return }
|
||||
toggle()
|
||||
}
|
||||
|
||||
isAccessibilityElement = true
|
||||
if #available(iOS 17.0, *) {
|
||||
|
||||
@ -109,12 +109,10 @@ open class ToggleView: Control, Changeable, FormFieldable {
|
||||
open override func setup() {
|
||||
super.setup()
|
||||
|
||||
publisher(for: .touchUpInside)
|
||||
.sink(receiveValue: { [weak self] _ in
|
||||
guard let self, isEnabled else { return }
|
||||
toggle()
|
||||
})
|
||||
.store(in: &subscribers)
|
||||
onClick = { [weak self] _ in
|
||||
guard let self else { return }
|
||||
toggle()
|
||||
}
|
||||
|
||||
isAccessibilityElement = true
|
||||
if #available(iOS 17.0, *) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user