Skip to content

Commit

Permalink
ContactApp: inplace delete row
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanayx committed Feb 29, 2024
1 parent a9207b9 commit 7c3c786
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/ContactApp/templates/index.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ let rows page (contacts: Contact[]) =
td() {
a(href= $"/contacts/{contact.Id}/edit"){ "Edit" }
a(href= $"/contacts/{contact.Id}"){ "View" }
a(href= "#", hxDelete= $"/contacts/{contact.Id}",
hxConfirm="Are you sure you want to delete this contact?",
hxTarget="body"){ "Delete" }
}
}
if contacts.Length = 5 then
Expand Down

0 comments on commit 7c3c786

Please sign in to comment.