From 7c3c786eb5995c57c609eee1774f78a3952b7192 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Wed, 28 Feb 2024 17:05:33 -0800 Subject: [PATCH] ContactApp: inplace delete row --- examples/ContactApp/templates/index.fs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/ContactApp/templates/index.fs b/examples/ContactApp/templates/index.fs index e329ca2..55ce634 100644 --- a/examples/ContactApp/templates/index.fs +++ b/examples/ContactApp/templates/index.fs @@ -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