Updating input group for auto values

This commit is contained in:
Conor_Mack 2020-06-02 15:09:31 +01:00
parent bb512a9bb2
commit ef1d7587b6
1 changed files with 3 additions and 2 deletions

View File

@ -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)
} }