Merge pull request #295 from Budibase/components/card-settings-and-input-suffix
Updating input group for auto values
This commit is contained in:
commit
1ac10adaa3
1 changed files with 3 additions and 2 deletions
|
@ -10,9 +10,10 @@
|
||||||
export let onChange = () => {}
|
export let onChange = () => {}
|
||||||
|
|
||||||
function handleChange(val, idx) {
|
function handleChange(val, idx) {
|
||||||
value.splice(idx, 1, suffix ? val + suffix : val)
|
value.splice(idx, 1, val !== "auto" ? value + suffix : val)
|
||||||
|
|
||||||
value = value
|
value = value
|
||||||
let _value = value.map(v => (!v.endsWith(suffix) ? v + suffix : v))
|
let _value = value.map(v => (!v.endsWith(suffix) && v !== "auto" ? v + suffix : v))
|
||||||
onChange(_value)
|
onChange(_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue