SfListView items do not appear until the first scroll occurs (macOS)

I implemented SfListView in the application I am currently working on and it works fine on Android, IOS and UWP, but on macOS a problem occurs as it does not show the items until the first scroll occurs, even if I delete items at runtime and is remove scrolling, all items disappear, I have tried using RefreshListViewItem and ForceUpdateItemSize methods to force update height of items when added at runtime, but it doesn't work either, can't think of what else to try as the rest of platforms work. I leave you a video showing what happens: 

Until the scroll does not appear, the items are not shown, and when I delete several items and add them again, they all disappear again until the scroll appears again. I use version 19.1.0.54 of Syncfusion.Xamarin.SfListView and Xamarin.Forms version 5.0.0.2012.

This is my code:

                       
                                               ItemsSource="{Binding Actions}"
                                               AutoFitMode="DynamicHeight"
                                               HorizontalOptions="FillAndExpand"
                                               VerticalOptions="FillAndExpand">
                           
                           
                               
                                   

23 Replies 1 reply marked as answer

UN Unknown April 5, 2021 09:47 AM UTC

(I can't edit the main post so I leave it here)

This is my code:

                        <syncfusion:SfListView x:Name="listView" 
                                               ItemsSource="{Binding Actions}"
                                               AutoFitMode="DynamicHeight"
                                               HorizontalOptions="FillAndExpand"
                                               VerticalOptions="FillAndExpand">
                            <syncfusion:SfListView.ItemTemplate>
                            <DataTemplate>
                                <StackLayout>
                                    <Label Text="{Binding MediaPeriodAction}" 
                                           TextColor="Black"
                                           FontSize="14"
                                           VerticalOptions="Start"
                                           HorizontalOptions="Start"/>
                                </StackLayout>
                            </DataTemplate>
                        </syncfusion:SfListView.ItemTemplate>
                        </syncfusion:SfListView>                     


UN Unknown April 5, 2021 03:39 PM UTC

I have built an example repository in which you can see that it works on all platforms except macOS:
https://github.com/nacompllo/SfListView164218


SS SaiGanesh Sakthivel Syncfusion Team April 6, 2021 01:41 PM UTC

Hi Sergio,

Thank you for contacting syncfusion support.

#Regarding SfListView items do not appear until the first scroll occurs (macOS)
Currently, we are checking the reported scenario and we will update the further details on or before the April 8 ,2021. We appreciate your patience until then.
 
  
Regards,  
SaiGanesh Sakthivel 



LN Lakshmi Natarajan Syncfusion Team April 9, 2021 04:12 AM UTC

Hi Sergio, 
 
Sorry for the delay caused. 
 
We are currently validating the reported issue with our development team. We will check and update you further details on or before April 12, 2021. We appreciate your patience until then. 
 
Regards, 
Lakshmi Natarajan 



LN Lakshmi Natarajan Syncfusion Team April 12, 2021 01:13 PM UTC

Hi Sergio, 
 
We regret for the continuous delay caused. 
 
We would like to inform you that the our source level layouts works fine as expected when updating the ItemsSource at run time. But, the issue occurs after updating to the Xamarin.Forms 5.0. Hence, we are currently checking the reported scenario in the framework level. We will check and update you further details on April 13, 2021. We appreciate your patience until then. 
 
Regards, 
Lakshmi Natarajan 



SS SaiGanesh Sakthivel Syncfusion Team April 14, 2021 12:33 PM UTC

Hi Sergio. 
 
Thank you for the patience. 
 
We have analyzed the reported query SfListView items do not appear until the first scroll occurs (macOS), from our end. There is a issue in Xamarin framework from higher version 4.8 onwards. From this version the items is not appearing properly. Below version 4.8, the item appearing is working fine as expected 
  
We have already logged an issue report for the same with Xamarin, kindly refer the following link for the same,  
   
We are having following up with the reported bug. We will update you further details once we got the solution from the Xamarin team. We appreciate your patience until then.  
   
Regards,  
SaiGanesh Sakthivel  



UN Unknown September 6, 2021 06:31 PM UTC

Hello, in the GitHub thread you mention the following:

Also, if we used the below code for macOS then it works fine in XF 5 but not in XF 4.8 or below.

this.ScrollOwner.ScrollToAsync( 0, 0, false);

Could you provide in this thread a nuget package with this "solution" that you comment on GitHub? at least to have a temporary fix until this is officially fixed? at least for those of us who face this error in Xamarin.Forms 5 in order to have a solution even though we have to be anchored in this nuget that you provide. I wait your answer.



LN Lakshmi Natarajan Syncfusion Team September 7, 2021 06:15 AM UTC

Hi Sergio, 
 
Thank you for the update. 
 
Could you please share the Syncfusion and Xamarin.Forms versions that you are using in your application? We will provide the patch based on that version. 
 
Lakshmi Natarajan 
 



UN Unknown September 7, 2021 06:46 AM UTC

Hi, thanks for the quick response, I attach the versions that I use:

Xamarin.Forms 5.0.0.2083

Syncfusion.Xamarin.SfListView 19.2.0.59

Syncfusion.Xamarin.GridCommon  19.2.0.59

Syncfusion.Xamarin.DataSource  19.2.0.59

Syncfusion.Xamarin.Core  19.2.0.59

Syncfusion.Licensing  19.2.0.59



UN Unknown September 8, 2021 09:42 AM UTC

Hello, I inform you that you have received an official response from the Xamarin.Forms team in the GitHub thread indicating the cause of the problem and indicating that the solution should be applied from the Syncfusion team:

Xamarin.Forms team response:

In #12721 we removed a variable from how the scroll position was determined. I think this fix was the right one, the problem we are seeing right now is that basically you on your side @saiganeshls2504 have implemented a workaround for our code that wasn't working correctly.


I don't see any way to fix this on our side without reintroducing the original bug or break other functionality. For instance, I came up with this that should fix your scenario, however, if someone tries to scroll to the bottom using this, we will now break them.


The only option I see, which is not desirable, is to add some new property to restore the legacy code and add that back. Do you have any options on your side? Like fix this code on your side and make the minimum dependency on Forms the version with this fix?



LN Lakshmi Natarajan Syncfusion Team September 8, 2021 11:33 AM UTC

Hi Sergio, 
 
Thank you for the update. 
 
#Regarding at least to have a temporary fix until this is officially fixed? 
 
We have generated the custom assemblies newly from a private build and you can download it from the below.   
   
Patch Link : https://www.syncfusion.com/downloads/support/forum/164218/ze/custom_assemblies2045848923
   
The assemblies should be replaced with the existing assemblies in the following location.                               
{Syncfusion Installed location}\Essential Studio\19.2.0.59\Xamarin\lib\pcl\Syncfusion.SfListView.XForms.dll                                          
{Syncfusion Installed location}\Essential Studio\19.2.0.59\Xamarin\lib\android\Syncfusion.SfListView.XForms.dll                                       
{Syncfusion Installed location}\Essential Studio\19.2.0.59\Xamarin\lib\android\Syncfusion.SfListView.XForms.Android.dll                               
{Syncfusion Installed location}\Essential Studio\19.2.0.59\Xamarin\lib\iOS\Syncfusion.SfListView.XForms.dll                                       
{Syncfusion Installed location}\Essential Studio\19.2.0.59\Xamarin\lib\iOS\Syncfusion.SfListView.XForms.iOS.dll                               
{Syncfusion Installed location}\Essential Studio\19.2.0.59\Xamarin\lib\uwp\Syncfusion.SfListView.XForms.dll                                       
{Syncfusion Installed location}\Essential Studio\19.2.0.59\Xamarin\lib\uwp\Syncfusion.SfListView.XForms.UWP.dll                                
                                     
Note: Please note that we have created these assemblies for the version 19.2.0.59 specifically to resolve the query requested in this incident. Could you please check with the above assemblies which resolves the reported issue?   
 
 
#Regarding the response from the Xamarin team 
 
We will review the Xamarin team's suggestions and validate them in our source level. We will update you further details in two business days (September 13, 2021). We appreciate your patience until then. 
 
Lakshmi Natarajan 
 



UN Unknown September 9, 2021 07:31 AM UTC

Thank you very much, with the custom assemblies that you have provided the problem has already been solved, I will stay on this version until there is an official solution published. Greetings.



LN Lakshmi Natarajan Syncfusion Team September 13, 2021 02:18 PM UTC

Hi Sergio, 
 
Thank you for the update. 
 
#Regarding Xamarin.Forms suggestion 
 
We would like to let you know that we are still analyzing the provided suggestion at the source level. We will check completely and update you further details on September 15, 2021. We appreciate your patience until then. 
 
Lakshmi Natarajan 
 



LN Lakshmi Natarajan Syncfusion Team September 16, 2021 04:14 AM UTC

Hi Sergio, 
 
Sorry for the further delay. 
 
We would like to inform you that the reported issue occurs due to in XF 5 (#12721). Since, the reported scenario breaks the same different XF versions, we could not come up with the common fix for the reported scenario. We are currently checking the same with our development team and update you further details before September 17, 2021. We appreciate your patience until then. 
 
Lakshmi Natarajan 
 



LN Lakshmi Natarajan Syncfusion Team September 23, 2021 05:25 AM UTC

Hi Sergio,
Thank you for your patience.
We have checked the reported issue “[macOS] Items disappeared after updating the ItemsSource at run time” and logged the issue report for the same. We will fix the issue and include the issue fix in our next Weekly Nuget release update which is planned to roll out on October 5, 2021. We appreciate your patience until then.
You can track the status of this report through the following feedback link,
Note: The provided feedback link is private, you need to login to view this feedback.
Lakshmi Natarajan




LN Lakshmi Natarajan Syncfusion Team October 5, 2021 12:39 PM UTC

Hi Sergio, 
 
Thank you for your patience.    
    
We have fixed the reported issue “[macOS] Items disappeared after updating the ItemsSource at run time” and included the issue fix in our latest Weekly NuGet release update version 19.3.0.44 which is available for download (https://www.nuget.org/).    
  
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.    
 
Lakshmi Natarajan 
 


Marked as answer

JB John Burrows January 31, 2022 05:03 AM UTC

I'm getting this issue on Xamarin Forms Ios

Using 

Xamarin Forms 5.0.0.2337

SfListView 19.4.0.47


Is it the same problem?



LN Lakshmi Natarajan Syncfusion Team February 1, 2022 02:51 PM UTC

Hi John, 
 
We will validate the reported scenario and update you with the details in the ticket you have created. Please check the ticket for further updates. 
 
Lakshmi Natarajan 
 



JH Johnny Hoang February 11, 2022 05:29 AM UTC

I'm facing the same problem on iOS 

Xamarin Forms 5.0.0.2337

SfListView 19.4.0.50



LN Lakshmi Natarajan Syncfusion Team February 15, 2022 05:37 AM UTC

Hi Johnny, 
 
We are facing items disappear issue with Xamarin.Forms v5.0.0.2337 and logged issue report for the same. We will fix the issue and include the issue fix in our next Weekly Nuget release update which is planned to roll out on March 1, 2022. We appreciate your patience until then. 
 
You can track the status of this report through the following feedback link, 
 
Note: The feedback link provided is private, you need to login to view this feedback. 
 
Regards, 
Lakshmi Natarajan 



LM Lindsay Miles February 19, 2022 03:14 AM UTC

Hello, I'm seeing similar issues but not on all lists. Very strange.

I have a Main form (no list) then a child form (with list). Selecting an item navigates to a grandchild form (with another list).

Child form list populates but all items disappear when the code exits the OnAppearing() method of the Form.
Grandchild form list populates and displays, no problem. Identical code, data different.

protected async override void OnAppearing()
{
            base.OnAppearing();
            await viewModel.LoadCategories();
            Title = "Catalogue";
            ForceLayout();    //the list is populated and visible when hitting a break on this line
}     //the list disappears after exiting this method. No other code of ours runs 


No code change. This was working prior to most recent XF update and Syncfusion controls update.


We tried this: 
Loading data in both the form constructor after BindingContext set AND in the OnAppearing() method as shown above

If we do not fetch data in the form constructor, the list does not appear.
If we don't fetch data in the OnAppearing() method, the list does not appear.
But the data is there when checking the return in either fetch.
We have to fetch data twice - in form constructor AND OnAppearing() method.

If we get data twice as described, the items appear but the list is set to bottom of screen, as if LayoutOptions.End is set but that is actually set to FillAndExpand in xaml.

Very strange behavior.

We will await the Syncfusion update on March 1st., else rollback to XF 4.8 etc.



LN Lakshmi Natarajan Syncfusion Team February 21, 2022 01:21 PM UTC

Hi Lindsay, 
 
We are facing items layout issue in Xamarin.Forms version 5.0.0.2337 when updating the collection at run time after clearing the collection. Based on the information provided, the reported issue is related to the above mentioned issue. We will let you know once the release rolled out and appreciate your patience until then. 
 
Regards, 
Lakshmi Natarajan 
 



LM Lindsay Miles February 21, 2022 07:41 PM UTC

Thanks Lakshmi, I thought this was all related...

I rolled back to XF 4.8, removed the extra data fetch I added in the VM constructor and all is working well again.

I'll keep monitoring Syncfusion updates and try when they're ready.


Loader.
Up arrow icon