Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [iOS]SwipeView not working on Grouped ListView #10908

Closed
Rabosa616 opened this issue May 31, 2020 · 6 comments
Closed

[Bug] [iOS]SwipeView not working on Grouped ListView #10908

Rabosa616 opened this issue May 31, 2020 · 6 comments
Labels
a/listview Problems with the ListView/TableView a/swipeview e/4 🕓 4 in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛
Projects

Comments

@Rabosa616
Copy link

Description

Using Swipeview in a grouped listview not working.
Left or right items are show 0 or only 1 time on the child items.

Steps to Reproduce

This is my list view implementation that works perfect with android
Alerts.xaml

<ListView.GroupHeaderTemplate>







</ListView.GroupHeaderTemplate>
<ListView.ItemTemplate>



<SwipeView.LeftItems>



</SwipeView.LeftItems>

<Grid.ColumnDefinitions>


</Grid.ColumnDefinitions>


                        </SwipeView>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

Models:
public class GroupedAlertResponseDto : ObservableCollection
{
public DateTime Date { get; set; }

}

public class AlertResponseDto
{
///


/// Gets or sets the field identifier.
///

/// The field identifier.
public Guid FieldId { get; set; }

    /// <summary>
    /// Gets or sets the sensor identifier.
    /// </summary>
    /// <value>The sensor identifier.</value>
    public Guid SensorId { get; set; }

    /// <summary>
    /// Gets or sets the alert identifier.
    /// </summary>
    /// <value>The alert identifier.</value>
    public Guid AlertId { get; set; }

    /// <summary>
    /// Gets or sets the date.
    /// </summary>
    /// <value>The date.</value>
    public DateTime Date { get; set; }

    /// <summary>
    /// Gets or sets if the alert is readed
    /// </summary>
    /// <value>Is Readed</value>
    public bool IsReaded { get; set; }

    /// <summary>
    /// Gets or sets the message.
    /// </summary>
    /// <value>The message.</value>
    public string Message { get; set; }
}
  • Version with issue: 4.7.0.813-pre2

  • Last known good version:

  • IDE:

    • Microsoft Visual Studio Enterprise 2019 Preview Version 16.6.0 Preview 6.0
    • Microsoft Visual Studio for Mac Enterprise 8.6 preview (8.6 build 4446)
  • Platform Target Frameworks:

    • iOS: 12.4, 13.5
    • Android: 9.0
  • Nuget Packages:
    Xamarin.Forms
    Xamarin.Forms.Maps

  • Affected Devices:
    Any iOS device

@Rabosa616 Rabosa616 added s/unverified New report that has yet to be verified t/bug 🐛 labels May 31, 2020
@pauldipietro pauldipietro added this to New in Triage May 31, 2020
@jsuarezruiz jsuarezruiz added a/listview Problems with the ListView/TableView a/swipeview p/iOS 🍎 labels Jun 1, 2020
@jsuarezruiz
Copy link
Contributor

@Rabosa616 I have tried to reproduce the issue without success.
issue10908

This is my sample (is a sample from the Xamarin.Forms Samples repository adding SwipeView)

Issue1908.zip

I tested with Xamarin.Forms 4.6 and 4.7-pre2, could you attach a repro sample?

@jsuarezruiz jsuarezruiz added s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Jun 1, 2020
@jsuarezruiz jsuarezruiz moved this from New to Needs Info in Triage Jun 1, 2020
@Rabosa616
Copy link
Author

Rabosa616 commented Jun 1, 2020

Hi @jsuarezruiz
try to use this collection:

grouped = new ObservableCollection<GroupedVeggieModel>();
var veggieGroup = new GroupedVeggieModel() { LongName = "vegetables", ShortName = "v" };
var fruitGroup = new GroupedVeggieModel() { LongName = "fruit", ShortName = "f" };
var veggie1Group = new GroupedVeggieModel() { LongName = "vegetables1", ShortName = "v1" };
var fruit1Group = new GroupedVeggieModel() { LongName = "fruit1", ShortName = "f1" };
var veggie2Group = new GroupedVeggieModel() { LongName = "vegetables2", ShortName = "v2" };
var fruit2Group = new GroupedVeggieModel() { LongName = "fruit2", ShortName = "f2" };
veggieGroup.Add(new VeggieModel() { Name = "celery", IsReallyAVeggie = true, Comment = "try ants on a log" });
veggieGroup.Add(new VeggieModel() { Name = "tomato", IsReallyAVeggie = false, Comment = "pairs well with basil" });
veggieGroup.Add(new VeggieModel() { Name = "zucchini", IsReallyAVeggie = true, Comment = "zucchini bread > bannana bread" });
veggieGroup.Add(new VeggieModel() { Name = "peas", IsReallyAVeggie = true, Comment = "like peas in a pod" });
fruitGroup.Add(new VeggieModel() { Name = "banana", IsReallyAVeggie = false, Comment = "available in chip form factor" });
fruitGroup.Add(new VeggieModel() { Name = "strawberry", IsReallyAVeggie = false, Comment = "spring plant" });
fruitGroup.Add(new VeggieModel() { Name = "cherry", IsReallyAVeggie = false, Comment = "topper for icecream" });

veggie1Group.Add(new VeggieModel() { Name = "celery", IsReallyAVeggie = true, Comment = "try ants on a log" });
veggie1Group.Add(new VeggieModel() { Name = "tomato", IsReallyAVeggie = false, Comment = "pairs well with basil" });
veggie1Group.Add(new VeggieModel() { Name = "zucchini", IsReallyAVeggie = true, Comment = "zucchini bread > bannana bread" });
veggie1Group.Add(new VeggieModel() { Name = "peas", IsReallyAVeggie = true, Comment = "like peas in a pod" });
fruit1Group.Add(new VeggieModel() { Name = "banana", IsReallyAVeggie = false, Comment = "available in chip form factor" });
fruit1Group.Add(new VeggieModel() { Name = "strawberry", IsReallyAVeggie = false, Comment = "spring plant" });
fruit1Group.Add(new VeggieModel() { Name = "cherry", IsReallyAVeggie = false, Comment = "topper for icecream" });

veggie2Group.Add(new VeggieModel() { Name = "celery", IsReallyAVeggie = true, Comment = "try ants on a log" });
veggie2Group.Add(new VeggieModel() { Name = "tomato", IsReallyAVeggie = false, Comment = "pairs well with basil" });
veggie2Group.Add(new VeggieModel() { Name = "zucchini", IsReallyAVeggie = true, Comment = "zucchini bread > bannana bread" });
veggie2Group.Add(new VeggieModel() { Name = "peas", IsReallyAVeggie = true, Comment = "like peas in a pod" });
fruit2Group.Add(new VeggieModel() { Name = "banana", IsReallyAVeggie = false, Comment = "available in chip form factor" });
fruit2Group.Add(new VeggieModel() { Name = "strawberry", IsReallyAVeggie = false, Comment = "spring plant" });
fruit2Group.Add(new VeggieModel() { Name = "cherry", IsReallyAVeggie = false, Comment = "topper for icecream" });

grouped.Add(veggieGroup);
grouped.Add(fruitGroup);
grouped.Add(veggie1Group);
grouped.Add(fruit1Group);
grouped.Add(veggie2Group);
grouped.Add(fruit2Group);

This will not fit on the screen and will force to show the scroll.
I think is this the moment where is not working correct.

PS: Thanks for the quick response!

@samhouts samhouts removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Jun 1, 2020
@samhouts samhouts moved this from Needs Info to New in Triage Jun 1, 2020
@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Jun 2, 2020
@jsuarezruiz jsuarezruiz added this to Backlog in SwipeView via automation Jun 2, 2020
@jsuarezruiz jsuarezruiz moved this from New to Ready For Work in Triage Jun 2, 2020
@jsuarezruiz
Copy link
Contributor

Thanks for the answer @Rabosa616, I have found the problem.

@Rabosa616
Copy link
Author

Hi @jsuarezruiz
I´m glad that I could help you to find the issue!

Let me know when I can test it.

Kind regards.

@samhouts samhouts removed this from Ready For Work in Triage Jun 7, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Jun 15, 2020
@samhouts samhouts moved this from Backlog to In Progress in SwipeView Jun 15, 2020
@samhouts samhouts added this to In Progress in 4.7.0 Jun 20, 2020
@samhouts samhouts moved this from In Progress to Done in 4.7.0 Jul 2, 2020
SwipeView automation moved this from In Progress to Done Jul 3, 2020
@Rabosa616
Copy link
Author

Thanks so much!
I will try next week on the iPhone when I get the new nugets

@TobiasJoergensen
Copy link

TobiasJoergensen commented Jul 16, 2020

I had related issue which the newest Xamarin update seems to have resolved.

@samhouts samhouts removed this from Done in SwipeView Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/listview Problems with the ListView/TableView a/swipeview e/4 🕓 4 in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛
Projects
No open projects
4.7.0
  
Done
Development

No branches or pull requests

4 participants