Skip to content

Commit 99d3b04

Browse files
authored
Merge pull request #118 from IgniteUI/tfs236797
Fixing combo scenario where the value contains ","
2 parents 91c7f75 + 96eb010 commit 99d3b04

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/igniteui-angular.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,14 @@
169169
}
170170
}
171171
function setControlValue( value ) {
172+
var combo = element.data(controlName), multiSelection = combo.options.multiSelection;
172173
comboItems = value;
173-
if (typeof value === "string") {
174+
if (typeof value === "string" && multiSelection && multiSelection.enabled) {
174175
// in case view value is changed from text field (default Array.toString representation is comma separated)
175-
value = value.split(",");
176+
value = value.split(multiSelection.itemSeparator);
176177
}
177-
comboValue(element.data(controlName), value);
178-
return element.data(controlName).text();
178+
comboValue(combo, value);
179+
return combo.text();
179180
}
180181
function parseValue() {
181182
//"parse" through the control value, ensure no-flicker with formatted values
@@ -187,7 +188,7 @@
187188
combo.refreshValue();
188189
}
189190

190-
return comboValue(element.data(controlName));
191+
return comboValue(combo);
191192
}
192193
element.on($.ig.angular.igCombo.events.join(" "), function (event, args) {
193194
scope.$apply(function () {

0 commit comments

Comments
 (0)