Bug fixes and tidyup

This commit is contained in:
Conor_Mack 2020-06-02 14:22:35 +01:00
parent e9da6b6151
commit afac093e83
3 changed files with 8 additions and 9 deletions

View File

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

View File

@ -30,7 +30,7 @@
textAlign="center"
placeholder={m.placeholder || ''}
value={!displayValues || displayValues[i] === '0' ? '' : displayValues[i]}
on:change={e => handleChange(e.target.value || 0, i)} />
onChange={value => handleChange(value || 0, i)} />
{/each}
</div>
</div>

View File

@ -248,15 +248,15 @@ export default {
label: "Content",
key: "content",
control: Input,
placeholder: "text"
placeholder: "text",
},
{
label: "Image",
key: "imageUrl",
control: Input,
placeholder: "src"
placeholder: "src",
},
]
],
},
},
{