Merge pull request #294 from Budibase/components/card-settings-and-input-suffix

Components/card settings and input suffix
This commit is contained in:
Conor_Mack 2020-06-02 15:06:43 +01:00 committed by GitHub
commit 24e803270e
1 changed files with 2 additions and 1 deletions

View File

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