Reviewed-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
Tested-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
On 11/11/2014 03:47 PM, Paulo Vital wrote:
On all pages with selectMenu (combobox) the user had to choose an
option to effectively store its value in the form.
This patch updates the function to use the first option as default
value. With this patch, user can skip the combo selection if want
use the first option.
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
ui/js/widgets/select-menu.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/js/widgets/select-menu.js b/ui/js/widgets/select-menu.js
index c4b0209..4a79605 100644
--- a/ui/js/widgets/select-menu.js
+++ b/ui/js/widgets/select-menu.js
@@ -46,6 +46,7 @@
if(option.value === value) {
item.addClass(selectedClass);
that.label.text(option.label);
+ that.target.val(option.value);
}
that.listControl.append(item);
});