Converter doesn't work correctly inside a CollectionView

Dimitris Mylonas 16 Reputation points
2021-03-05T15:39:12.79+00:00

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)

74887-rpreplay-final1614957172.gif

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,292 questions
{count} votes