Skip to content

Commit 78e686c

Browse files
committed
Merge pull request select2#1336 from igaidai4uk/patch-1
Remove duplication of "No matches found" message
2 parents 79a0f1d + dae97ff commit 78e686c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

select2.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2739,7 +2739,9 @@ the specific language governing permissions and limitations under the Apache Lic
27392739

27402740
//If all results are chosen render formatNoMAtches
27412741
if(!this.opts.createSearchChoice && !choices.filter('.select2-result:not(.select2-selected)').length > 0){
2742-
this.results.append("<li class='select2-no-results'>" + self.opts.formatNoMatches(self.search.val()) + "</li>");
2742+
if(!data || data && !data.more) {
2743+
this.results.append("<li class='select2-no-results'>" + self.opts.formatNoMatches(self.search.val()) + "</li>");
2744+
}
27432745
}
27442746

27452747
},

0 commit comments

Comments
 (0)