1
0
Fork 0
mirror of synced 2024-10-01 09:38:55 +13:00

Some extra comments

This commit is contained in:
Michael Shanks 2020-07-06 17:10:55 +01:00
parent a55865e34c
commit 9098858ef8
2 changed files with 8 additions and 0 deletions

View file

@ -53,6 +53,8 @@
resetForm()
// set saved, and unset after 1 second
// i.e. make the success notifier appear, then disappear again after time
saved = true
setTimeout(() => {
saved = false
@ -61,6 +63,8 @@
saving = false
}
// we cannot use svelte bind on these inputs, as it does not allow
// bind, when the input type is dynamic
const resetForm = () => {
for (let el of Object.values(inputElements)) {
el.value = ""

View file

@ -50,6 +50,8 @@
resetForm()
// set saved, and unset after 1 second
// i.e. make the success notifier appear, then disappear again after time
saved = true
setTimeout(() => {
saved = false
@ -58,6 +60,8 @@
saving = false
}
// we cannot use svelte bind on these inputs, as it does not allow
// bind, when the input type is dynamic
const resetForm = () => {
for (let el of Object.values(inputElements)) {
el.value = ""