Skip to content

Commit

Permalink
Fix 'no objects' message not showing up in filtering-multiselect widget
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Sep 21, 2021
1 parent f45c0f4 commit aa5545c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,16 @@
}
}
if (filtered.length > 0) {
widget.collection[0].innerHTML = '';
widget.collection.html('');
for (i = 0; i < filtered.length; i++) {
var newOptions = $('<option></option>')
.prop('value', matches[filtered[i]].id)
.prop('title', matches[filtered[i]].label)
.text(matches[filtered[i]].label);
$(widget.collection[0]).append(newOptions);
widget.collection.append(newOptions);
}
} else {
widget.collection[0].innerHTML = widget.noObjectsPlaceholder;
widget.collection.html(widget.noObjectsPlaceholder);
}
});
},
Expand Down

0 comments on commit aa5545c

Please sign in to comment.