first crack at updating multiple attribute

This commit is contained in:
Barbara Borges Ribeiro
2016-08-11 22:29:51 +01:00
parent 183e9a3d0b
commit ff034c5013
6 changed files with 33 additions and 11 deletions

View File

@@ -87,6 +87,17 @@ $.extend(selectInputBinding, {
this.setValue(el, data.value);
}
if (data.hasOwnProperty('multiple')) {
if (data.multiple) {
$(el).attr('multiple', 'multiple');
$(el).next().attr('class', 'selectize-control multi');
}
else {
$(el).attr('multiple', '');
$(el).next().attr('class', 'selectize-control single');
}
}
if (data.hasOwnProperty('label'))
$(el).parent().parent().find('label[for="' + $escape(el.id) + '"]').text(data.label);