From dc516e7073605723be59bc727b96a3b3dea1ae5a Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Mon, 23 Nov 2015 18:40:50 -0500 Subject: [PATCH] Add container to templateResult This closes https://github.com/select2/select2/issues/3222. --- src/js/select2/results.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/select2/results.js b/src/js/select2/results.js index bca8d2d3..1e49263c 100644 --- a/src/js/select2/results.js +++ b/src/js/select2/results.js @@ -501,7 +501,7 @@ define([ var template = this.options.get('templateResult'); var escapeMarkup = this.options.get('escapeMarkup'); - var content = template(result); + var content = template(result, container); if (content == null) { container.style.display = 'none';