Closed xav1b closed 4 years ago
Eureka's code does not set the section to disabled. Maybe you should make sure that you are not doing it somewhere else. And make sure that isDisabled
is actually the reason why the guard statement is false.
@mats-claassen To give a little more context, I have a CheckBoxRow
which is a subclass of Row
and every time it's interacted with, the row simply updates it's UI between an on and off state. I'm not explicitly setting disabled to true anywhere because there's no case where I would want a checkbox row to be disabled. In an attempt to ensure it isn't, I set row.disabled = false
in update()
as well as the places mentioned before.
Example:
Print statements in Eureka code
When successfully checking a row:
Navigating back to the screen and trying to check a row:
It is weird. I cannot reproduce it. isDisabled
is an interface to disabledCache
which is only reset in evaluateDisabled so I don't understand how you can have disabled rows there unless some part of your code does it.
I can't investigate this without a sample project as I cannot reproduce it with a simple push and back.
Found the bug. Overlooked a line of code on my end. Closing the issue
Eureka version 5.2.1 Xcode 11.4 iOS 13.5.1
I have two check box rows in a
.singleSelection(enableDeselection: false)
SelectableSection
that unintentionally become disabled when navigating away from the screen and then returning to it. I say that because Im not sure what causes the switch. I have tried explicitly setting$0.disabled = false
when creating the row then again in aviewWillAppear
function followed by a call toevaluateDisabled()
but no luck. I found that the prepare function in theSelectableSection
class as the blocker for the desired behavior. Any thoughts on why the rows are disabled when returning to the form?