mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
fix: InputItem: return empty string for none value in type number
This commit is contained in:
parent
008c2c53ab
commit
9649627bb8
1 changed files with 1 additions and 0 deletions
|
@ -34,6 +34,7 @@ const touch = inject(ValidationTouchSymbol)
|
||||||
const model = defineModel<string | number | null>({
|
const model = defineModel<string | number | null>({
|
||||||
set(value) {
|
set(value) {
|
||||||
if (props.type === 'number' && typeof value === 'string') {
|
if (props.type === 'number' && typeof value === 'string') {
|
||||||
|
if (value === '') return ''
|
||||||
return parseInt(value)
|
return parseInt(value)
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
|
|
Loading…
Add table
Reference in a new issue