SwiftUI Context Menu Popping Up Whole List

When I used Context Menu for each photo in three columns.

So, the code is like below:

List {
  LazyVGrid(columns: columns) {
    View()
      .contextMenu {
         Button()
      }
  }
}

This just pop up whole list not individual element when I long press the element to see context menu.

The whole list is highlighted when context menu appears.

How can I make this to highlight individual element not the whole list?

If I remove any of List or LazyVGrid the problem fix. But the columns are not in the way I want.

Also, I don't want to change List to VStack or ScrollView which don't have refreshControl.

Thanks in advance.

Have you ever found a solution for that?

the only way to achieve this is to use ScrollView, but for a large amount of image lists there are some performance issues that do not occur with the List component.

You could use the Menu component instead of contextmenu like explained on stackoverflow

SwiftUI Context Menu Popping Up Whole List
 
 
Q