|
|
@@ -13,18 +13,18 @@ struct TagBarView: View {
|
|
|
|
|
|
var body: some View {
|
|
|
HStack {
|
|
|
- TextField("Tag", text: $active)
|
|
|
- .onSubmit {
|
|
|
- tags.append(active)
|
|
|
- active = ""
|
|
|
- }
|
|
|
ForEach($tags, id: \.self) { tag in
|
|
|
TextField("", text: tag)
|
|
|
.onSubmit {
|
|
|
tags.removeAll(where: { $0.isEmpty })
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ TextField("Tag", text: $active)
|
|
|
+ .onSubmit {
|
|
|
+ tags.append(active)
|
|
|
+ active = ""
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|