Skip to content

Commit

Permalink
Merge pull request #118 from IgniteUI/tfs236797
Browse files Browse the repository at this point in the history
Fixing combo scenario where the value contains ","
  • Loading branch information
kdinev authored Sep 19, 2017
2 parents 91c7f75 + 96eb010 commit 99d3b04
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/igniteui-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,14 @@
}
}
function setControlValue( value ) {
var combo = element.data(controlName), multiSelection = combo.options.multiSelection;
comboItems = value;
if (typeof value === "string") {
if (typeof value === "string" && multiSelection && multiSelection.enabled) {
// in case view value is changed from text field (default Array.toString representation is comma separated)
value = value.split(",");
value = value.split(multiSelection.itemSeparator);
}
comboValue(element.data(controlName), value);
return element.data(controlName).text();
comboValue(combo, value);
return combo.text();
}
function parseValue() {
//"parse" through the control value, ensure no-flicker with formatted values
Expand All @@ -187,7 +188,7 @@
combo.refreshValue();
}

return comboValue(element.data(controlName));
return comboValue(combo);
}
element.on($.ig.angular.igCombo.events.join(" "), function (event, args) {
scope.$apply(function () {
Expand Down

0 comments on commit 99d3b04

Please sign in to comment.