Eureka icon indicating copy to clipboard operation
Eureka copied to clipboard

Show / Hidde row: Evaluate Hidden is called twice

Open aluco100 opened this issue 3 years ago • 2 comments

Hi there,

Recently I developed a functionality that shows a row within a string value. The code is following:

shippingPrice.hidden = Condition.function([], { (form) -> Bool in
                        print(!value.contains("Fijo"))
                        return !value.contains("Fijo")
                    })
shippingPrice.evaluateHidden()

However, the evaluateHidden's function is calling just twice. So appears and dissapears just twice, then it's not showing again and then crash with the following error:

'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (9) must be equal to the number of rows contained in that section before the update (9), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'

Can anybody help me with that?

Best Regards

aluco100 avatar Mar 18 '21 15:03 aluco100

There seems to be a different error in your code, leading to that crash. With the code alone you posted that is hard to reproduce. Could you provide a snippet that produces this?

Also, in which context/function are you calling evaluateHidden? That might be the cause of the issue

mats-claassen avatar Mar 19 '21 13:03 mats-claassen

@aluco100 Is it safe to to assume that 'shippingPrice' is of type 'BaseRow'?

Tulakshana avatar Sep 16 '21 15:09 Tulakshana