I have a Nativescript-Angular code sharing project. I use two
ListView of in a lazy loaded module. The lazy loaded module is structured so that when I navigate to this module from AppModule, I have a component that has a TabView element as the root element, as shown below.
Router-page output shows a side-by-side component in TabView. These components have ListView as the root element, as shown below
Now, the problem I'm facing is when these two list views are displayed side by side. Sometimes the list views show nothing and sometimes only the second tab displays data while the first tab only shows the item separators, as shown below: –
Case 1 tab-1
Case 1 tab 2
Case 2 tab-1
Case 2 tab 2
Articles always have more than one item, but the problem persists.
I've tried using the function
listview.refresh () but still not successful with that. I've also used
ChangedDetectionStratergy.OnPush and called
marquéForRefresh function when the data is received. I tried to use
ObservableArray provided by
Nativescript but I was a little confused using this and also I thought it was not available for the code share project.
I've been frustrated since yesterday and it looks like a Nativescript bug. Can you help to overcome it so that both tabs always display the data (knowing that arrays always have more than one element)?