79291710

Date: 2024-12-18 15:56:32
Score: 0.5
Natty:
Report link

I found a solution to the problem, which lies in the fact that when I clicked on the Manage button, I noticed that the click event would cover the entire VStack in the Form.

So every time I clicked on the Manage button, I actually clicked on all the delete buttons in the TagView. It clears the tags.

To fix it, I simply added .buttonstyle (.plain) under the Manage and delete buttons

Button(action: { showingTagManagement = true }) {
    Text("Manage")
}
.buttonStyle(.plain)

Button("test") {
    tags.append("test")
}
.buttonStyle(.plain)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Xuefei Lv