Skip to content

Commit a1c3691

Browse files
fixed #24 - cascade dropdown not working with select2
1 parent 0acd360 commit a1c3691

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/select2-tagbox.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function init(Survey, $) {
3030
$el.val(question.value).trigger("change");
3131
};
3232
var updateChoices = function() {
33+
$el.select2().empty();
3334
$el.select2({
3435
data: question.visibleChoices.map(function(choice) {
3536
return { id: choice.value, text: choice.text };

src/select2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ function init(Survey, $) {
5959
question.comment = othersEl.value;
6060
};
6161
var updateChoices = function() {
62+
$el.select2().empty();
6263
$el.select2({
6364
data: question.visibleChoices.map(function(choice) {
6465
return { id: choice.value, text: choice.text };

0 commit comments

Comments
 (0)