Fix tag assignment in post UI
This commit is contained in:
@@ -47,6 +47,7 @@ struct PostDetailView: View {
|
||||
footer: "The id is used to link to post and store them",
|
||||
validation: post.isValid,
|
||||
update: { post.update(id: $0) })
|
||||
.id(post.id)
|
||||
|
||||
BoolPropertyView(
|
||||
title: "Draft",
|
||||
@@ -69,6 +70,7 @@ struct PostDetailView: View {
|
||||
selectedPage: $post.linkedPage,
|
||||
footer: "The page to open when clicking on the post")
|
||||
.onChange(of: post.linkedPage) { oldValue, newValue in
|
||||
|
||||
if newValue != nil {
|
||||
post.tags = []
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user