Skip to content

Commit 26f4160

Browse files
committed
Merge pull request select2#1247 from juliankrispel/master
Display formatNoMatches when all ajax results are selected
2 parents e210181 + 9d06fe2 commit 26f4160

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

select2.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,6 +2695,11 @@ the specific language governing permissions and limitations under the Apache Lic
26952695
self.highlight(0);
26962696
}
26972697

2698+
//If all results are chosen render formatNoMAtches
2699+
if(!this.opts.createSearchChoice && !choices.filter('.select2-result:not(.select2-selected)').length > 0){
2700+
this.results.append("<li class='select2-no-results'>" + self.opts.formatNoMatches(self.search.val()) + "</li>");
2701+
}
2702+
26982703
},
26992704

27002705
// multi

0 commit comments

Comments
 (0)