xamarin/Xamarin.Forms
[Bug] [UWP] Adding a new item in Master-detail page causes the list to reload
オープン
#8,695 opened on 2019/11/27
a/listviewe/3 :clock3:help wantedinactivep/UWPt/bug :bug:up-for-grabs
Repository metrics
- Stars
- (5,644 個のスター)
- PR merge metrics
- (30d に merged PR はありません)
説明
Description
The problem was originally reported on StackOverflow by Lordalcol.
When the default template of Master-detail page is created and user navigates to add a new item and saves it, the list first appears invisible and fades with a delay instead of just one new item being animated in. In contrast, when the Cancel button is tapped, the list does appear immediately.
Steps to Reproduce
- Create default master-detail XF app with UWP
- Launch
- Navigate to Add new item page
- Save item
- Notice the list fades in as a whole, with a visible delay
- Go to Add new item page
- Cancel
- See the list animates in immediately
Also note that when the ItemsViewModel message subscription is changed to:
MessagingCenter.Subscribe<NewItemPage, Item>(this, "AddItem", async (obj, item) =>
{
await Task.Delay(100); //added delay
var newItem = item as Item;
Items.Add(newItem);
await DataStore.AddItemAsync(newItem);
});
The application works properly - when item is saved, the list appears immediately and only the new item is animated in - see video.
Expected Behavior
Only new item should animate.
Actual Behavior
Whole list fades in with a delay.
Basic Information
- Version with issue: 4.3.0.991211
- Last known good version: none
- IDE: VS 2019.3.10
- Platform Target Frameworks
- UWP: 16299 - newer (does not work with any version)