Commit 74062438 authored by Thien Pham's avatar Thien Pham

Change dataprovider tags variable into an array

Change dataprovider tags variable into an array instead of jquery object to keep order of dataprovider array. Got rid of .add() as jquery states:

http://api.jquery.com/add/
"Do not assume that this method appends the elements to the existing collection in the order they are passed to the .add() method"
parent 847873e4
......@@ -1067,7 +1067,7 @@
dataprovider: function(dataprovider) {
var optionDOM = "";
var groupCounter = 0;
var tags = $(''); // create empty jQuery array
var tags = []; // create empty array
$.each(dataprovider, function (index, option) {
var tag;
......@@ -1094,9 +1094,10 @@
title: option.title,
selected: !!option.selected
});
tags.push(tag);
}
tags = tags.add(tag);
});
this.$select.empty().append(tags);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment