Merge pull request #2360 from ycdtosa/master
changes on updateResults, populate by @cervengoc on #781
This commit is contained in:
commit
d487fc58a8
@ -920,6 +920,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
|
|
||||||
results = opts.sortResults(results, container, query);
|
results = opts.sortResults(results, container, query);
|
||||||
|
|
||||||
|
// collect the created nodes for bulk append
|
||||||
|
var nodes = [];
|
||||||
for (i = 0, l = results.length; i < l; i = i + 1) {
|
for (i = 0, l = results.length; i < l; i = i + 1) {
|
||||||
|
|
||||||
result=results[i];
|
result=results[i];
|
||||||
@ -959,9 +961,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
}
|
}
|
||||||
|
|
||||||
node.data("select2-data", result);
|
node.data("select2-data", result);
|
||||||
container.append(node);
|
nodes.push(node[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bulk append the created nodes
|
||||||
|
container.append(nodes);
|
||||||
liveRegion.text(opts.formatMatches(results.length));
|
liveRegion.text(opts.formatMatches(results.length));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user