Some extra comments
This commit is contained in:
parent
8fc00ee78d
commit
ee0ab87c31
|
@ -53,6 +53,8 @@
|
||||||
|
|
||||||
resetForm()
|
resetForm()
|
||||||
|
|
||||||
|
// set saved, and unset after 1 second
|
||||||
|
// i.e. make the success notifier appear, then disappear again after time
|
||||||
saved = true
|
saved = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
saved = false
|
saved = false
|
||||||
|
@ -61,6 +63,8 @@
|
||||||
saving = false
|
saving = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we cannot use svelte bind on these inputs, as it does not allow
|
||||||
|
// bind, when the input type is dynamic
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
for (let el of Object.values(inputElements)) {
|
for (let el of Object.values(inputElements)) {
|
||||||
el.value = ""
|
el.value = ""
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
|
|
||||||
resetForm()
|
resetForm()
|
||||||
|
|
||||||
|
// set saved, and unset after 1 second
|
||||||
|
// i.e. make the success notifier appear, then disappear again after time
|
||||||
saved = true
|
saved = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
saved = false
|
saved = false
|
||||||
|
@ -58,6 +60,8 @@
|
||||||
saving = false
|
saving = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we cannot use svelte bind on these inputs, as it does not allow
|
||||||
|
// bind, when the input type is dynamic
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
for (let el of Object.values(inputElements)) {
|
for (let el of Object.values(inputElements)) {
|
||||||
el.value = ""
|
el.value = ""
|
||||||
|
|
Loading…
Reference in New Issue