From 81e269bd6541d4fbc166f9f60685aba768b822a4 Mon Sep 17 00:00:00 2001 From: John Schult Date: Thu, 24 Sep 2015 14:34:19 -0400 Subject: [PATCH] Added ability to specify dropdown label text when using API See: http://semantic-ui.com/modules/dropdown.html#specifying-different-text-- hidden-input-values --- src/definitions/modules/dropdown.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index bd2355cd2f..0ca6310e84 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -3312,6 +3312,7 @@ $.fn.dropdown.settings = { fields: { values : 'values', // grouping for all dropdown values name : 'name', // displayed dropdown text + text : 'text', // displayed label text value : 'value' // actual dropdown value }, @@ -3388,7 +3389,11 @@ $.fn.dropdown.settings.templates = { menu: function(response, fields) { var html = ''; $.each(response[fields.values], function(index, option) { - html += '
' + option[fields.name] + '
'; + html += '
'; }); return html; },