1
0
Fork 0
mirror of synced 2024-07-02 21:10:43 +12:00

Allowing auto values for inputs

This commit is contained in:
Conor_Mack 2020-06-02 15:00:24 +01:00
parent 2c228fee81
commit 006a4de77e

View file

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