add new input 'varSelectInput()' and input binding 'shiny.symbol' and 'shiny.symbolList'

This commit is contained in:
Barret Schloerke
2018-06-07 16:10:01 -04:00
parent 2880391620
commit 6529529cdb
5 changed files with 190 additions and 3 deletions

View File

@@ -3,6 +3,18 @@ $.extend(selectInputBinding, {
find: function(scope) {
return $(scope).find('select');
},
getType: function(el) {
var $el = $(el);
if (!$el.hasClass("symbol")) {
// default character type
return null;
}
if ($el.attr("multiple") === "multiple") {
return 'shiny.symbolList';
} else {
return 'shiny.symbol';
}
},
getId: function(el) {
return InputBinding.prototype.getId.call(this, el) || el.name;
},