-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] When expanding the last tile in a Grouped Accordion ListView, the content is not visible #10030
Comments
Hi @doriangh thanks for the report. When you talk about "Grouped Accordion ListView" is that something custom you have created or a third-party control or something? It would be great if you could provide a little reproduction project that shows the issue. Same goes for the other issue you just opened. |
Hello! Here's a reproduction link. The reproduction link works for both issues as closing the group calls Clear() method. Thank you! |
So, I'm not really sure if this is a bug. While this is clearly possible with a Depending on how you want to reference your public ICommand ExpandGroup => new Command<TestItemGroupModel>(group =>
{
if (!group.Expanded && GroupItems.Any(x => x.Expanded))
GroupItems.FirstOrDefault(x => x.Expanded).Expanded = false;
group.Expanded = !group.Expanded;
// This was added
MessagingCenter.Send(this, "scrollit");
}); public ItemsPage()
{
InitializeComponent();
BindingContext = viewModel = new ItemsViewModel();
// This was added
MessagingCenter.Subscribe<ItemsViewModel>(this, "scrollit", m => ItemsListView.ScrollTo(m.GroupItems.FirstOrDefault(i => i.Expanded)?[0], ScrollToPosition.Start, false));
} You can do it a bit differently and definitely add error handling, but this way the opened group will scroll into view. You might have better luck with using the |
Thank you very much for your reply. I have tested the workaround and can confirm it is working. But thanks anyway! |
@doriangh can you log a bug? It'll be quicker to get this all working and fixed in CollectionView then it will be with ListView |
Description
When having a Grouped ListView with accordions, when there are enough groups so it can fill the whole screen and even more, when going straight to the bottom group, it does not come into view. It expands under the screen.
Steps to Reproduce
Expected Behavior
The list view slightly scrolls up as to place into view the content of the group
Actual Behavior
The group expands but the data is underneath, and the user has to scroll to be able to see the data
Basic Information
The text was updated successfully, but these errors were encountered: