Allowing auto values for inputs

This commit is contained in:
Conor_Mack 2020-06-02 15:00:24 +01:00
parent afac093e83
commit e0ca7976f4
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@
function handleChange(val) { function handleChange(val) {
value = val value = val
onChange(value) let _value = value + suffix
onChange(_value)
} }
$: displayValue = suffix && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : value $: displayValue = suffix && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : value