1
0
Fork 0
mirror of synced 2024-10-01 17:47:46 +13:00

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 3acfb99cd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,8 @@
function handleChange(val) { function handleChange(val) {
value = 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 || "") $: displayValue = suffix && value && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : (value || "")