Grial-UI-Kit-Support
Grial-UI-Kit-Support copied to clipboard
Grial:Repeater only displays the first 5 items of the ItemSource
Description
I am using the Grial Repeater component in my Xamarin.Forms application (targeting Android) based on the Task Browser sample page. I am setting its ItemSource to my Viewmodel (ObservableCollection<MyModel>). However, when I have more than 5 items in my Binding / ItemSource then these are not displayed. Only the first 5 items are displayed. In my example I have 7 records in my binding list, but only the first 5 are displayed. I have tried it using a API call and when setting a plain list with more than 5 entries. It also seems the application IS allocating space for the last, not visible, entries:
Repeater XAML:
<grial:TabItem Text="{grial:Translate StringWorkspaces}">
<grial:Repeater
Margin="-20,0,0,0"
HeightRequest="320"
ItemSize="215"
ItemsSource="{Binding ClientData}"
Orientation="Horizontal"
ScrollBarVisibility="Never"
ScrollPadding="20,0,20,0"
Spacing="10">
<grial:Repeater.ItemTemplate>
<DataTemplate>
<local:PCSClientTemplate
HeightRequest="320"
HorizontalOptions="Center"
WidthRequest="215" />
</DataTemplate>
</grial:Repeater.ItemTemplate>
</grial:Repeater>
</grial:TabItem>
The PCSClientTemplate
is the same as the original TaskBrowserCardItemTemplate
, only the binding names are changed and the LineChart
is replaced with a RingChart
.
Steps to Reproduce
- Create a Xamarin.Forms page and add the grial:Repeater control.
- Set the binding to my viewmodel's list.
- Make sure the bind object has more than 5 list items
Expected Behavior
The repeater should show all the entries (7).
Actual Behavior
The repeater is only showing the first 5 entries.
Basic Information
-
Version with issue: Grial 3.0.70
-
IDE: Visual Studio 2019 16.6.2
-
Platform Target Frameworks:
- Android: 9.0 (Pie)
-
Nuget Packages:
- Xamarin.Forms (4.7.0.968)
- Xamarin.Essentials (1.5.3.2)
- Microsoft.CSharp(4.7.0)
- NETStandard.Library (2.0.3)
- Splat (9.5.49)
- ComponentsModel.Annotations (4.7.0)
- Xamanimation (1.3.0)
- Xamarin.FFImageLoading (2.4.11.982)
- Microcharts (0.8.5-pre)
- Newtonsoft.Json (12.0.3)
- Rg.Plugins.Popup(2.0.0.3)
-
Affected Devices: Pixel 2 API 29 (Android 10.0)