I'm trying to make a horizontal scrollview that has multiple lists embedded inside of it, thing is that even implementing the delete method i can scroll the lists or the scrollviews but i can't use the delete action.
I wonder if is there any way i can overcome this problem, maybe by making the scrollview non-scrollable when the finger is on the cell or if there's a smarter option.
Here's the code:
var body: some View {
ScrollView(.horizontal, showsIndicators: true){
HStack(alignment: .top, spacing: 60){
ForEach(data.trips[0].days){ day in
List{
Section{
Text(String((day as Day).date))
ForEach(day.stops){ stop in
Text((stop as Stop).title)
}.onDelete(perform: self.delete)
}
}
.listStyle(GroupedListStyle())
}
}.frame(width:800)
}.background(Color.clear)
}
func delete(at offsets: IndexSet){
print(offsets)
}
Of course it slides left/right through the scrollview and up/down through the list