Updating input group for auto values
This commit is contained in:
parent
bb512a9bb2
commit
ef1d7587b6
|
@ -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 New Issue