Skip to content

Commit 4860f35

Browse files
committed
ui-select2 does not split on select2's "separator" option for multiple
Bug related to PR angular-ui#115. Updated code to split on separator option instead of a comma. Splitting on a comma breaks if selected tag contains a comma e.g. selecting "Springsteen, Bruce" would cause two tags.
1 parent 4469fd7 commit 4860f35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/select2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelec
9898
if (opts.multiple) {
9999
var viewValue = controller.$viewValue;
100100
if (angular.isString(viewValue)) {
101-
viewValue = viewValue.split(',');
101+
viewValue = viewValue.split(opts.separator);
102102
}
103103
elm.select2(
104104
'data', convertToSelect2Model(viewValue));

0 commit comments

Comments
 (0)