TimLariviere / Fabulous-new

Fabulous v2 - Work in progress
https://timothelariviere.com/Fabulous-new/
Other
41 stars 3 forks source link

Apply ItemTemplate inside DataTemplate instead of ItemsSource #118

Closed TimLariviere closed 2 years ago

TimLariviere commented 2 years ago

The way virtualised collection was handled before conflicted with CarouselView on XF.Android...

Before:

After:

The issue before is that CarouselViewRenderer on Android is actually trying to find the index of an item in the ItemsSource. This is fine except Widgets generated by Fabulous are not equatable so the index will be -1 is some cases, which is an invalid value.

https://github.com/xamarin/Xamarin.Forms/blob/12708e140f1f8cd6e61e36804cc0e7f5b1a88daf/Xamarin.Forms.Platform.Android/CollectionView/CarouselViewRenderer.cs#L354