mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Properly handle empty select-multiple userfield (fixes #2339)
This commit is contained in:
parent
c8891236e6
commit
1e60f940e4
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
### Userfields
|
### Userfields
|
||||||
|
|
||||||
- xxx
|
- Fixed that when having a userfield of type "Select list (multiple items can be selected)" and selecting no item, editing of the corresponding form was broken
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
|
||||||
|
@ -143,7 +143,11 @@ Grocy.Components.UserfieldsForm.Load = function()
|
|||||||
}
|
}
|
||||||
else if (input.hasAttr("multiple"))
|
else if (input.hasAttr("multiple"))
|
||||||
{
|
{
|
||||||
input.val(value.split(","));
|
if (value)
|
||||||
|
{
|
||||||
|
input.val(value.split(","));
|
||||||
|
}
|
||||||
|
|
||||||
$(".selectpicker").selectpicker("render");
|
$(".selectpicker").selectpicker("render");
|
||||||
}
|
}
|
||||||
else if (input.attr('type') == "file")
|
else if (input.attr('type') == "file")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user