Clear task input after submitting
This commit is contained in:
@@ -60,7 +60,7 @@ fn index() -> Response {
|
|||||||
body {
|
body {
|
||||||
main {
|
main {
|
||||||
h1 { "To-do" }
|
h1 { "To-do" }
|
||||||
form hx-post="/add" hx-target="#list" hx-swap="innerHTML" {
|
form hx-post="/add" hx-target="#list" hx-swap="innerHTML" hx-on:submit="this.elements.task.value = ''" {
|
||||||
input type="text" name="task" placeholder="Task";
|
input type="text" name="task" placeholder="Task";
|
||||||
input type="submit" value="Add";
|
input type="submit" value="Add";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user