Add default value for string field

This commit is contained in:
Andrew Kingston 2021-08-04 14:34:06 +01:00
parent 5835c1591f
commit eaaee33906
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@
export let placeholder
export let type = "text"
export let disabled = false
export let defaultValue = ""
let fieldState
let fieldApi
@ -16,6 +17,7 @@
{label}
{field}
{disabled}
{defaultValue}
type={type === "number" ? "number" : "string"}
bind:fieldState
bind:fieldApi