Open sigmundfridge opened 5 years ago
Actually that hack way doesn't help.....
The only way I can see to fix is to either observe everything (rather than bind) and compare index paths, or to override "prepareForReuse" and entirely replace the text field. Neither is ideal. When I have more time I can look at a "clear all bindings" method that can be applied at start of "cell for index path"
If I have multiple text fields in a table observing changes to a model property, then as the cells are reused they start observing multiple properties. This can be fixed by checking that the observable value returned matches the model property, but it would be better to clear observables when a cell is reused (and as far as I know you can only add obervables). For the example below, changing pickerTwo value will sometimes also update rowOne as it has previously been observing rowTwo (under cell reuse rules)