Converter doesn't work correctly inside a CollectionView
Xamarin.Forms v.4.8.0.1269
I'm facing the following problem only in iOS
In the DataTemplate
of a CollectionView
, I have a Label
that shows the price of an order.
The order has a status (enum) which can be accepted canceled, rejected etc.
I have a converter that depending on the status of the order, I set the TextDecoration
of the Label
to StrikeThrough
(when canceled or rejected) or to None
in any other case.
When data are loaded for the first time, everything looks good.
After I refresh the data, for the second time, some of the labels have a TextDecorations.Strikethrough
, although they don't suppose that have (their order status is not canceled or rejected)
Data are hardcoded, so they don't change during refresh
You can find an example at the following repo
I guess the question is obvious, why the converter (or the CollectionView) doesn't work correctly after the second refresh, or is it something else that is going wrong?
How can I fix this?
You can see the effect in the following screencast (the price of the second item in the CollectionView will have TextDecorations.Strikethrough
after the second refresh)