1
0
mirror of synced 2025-02-04 14:19:23 +03:00

Render formatNoMatches when all ajax results are selected #381

This commit is contained in:
Julian Krispel-Samsel 2013-05-04 08:03:00 +01:00
parent 07afbdf0eb
commit 9d06fe24dc

View File

@ -2592,6 +2592,11 @@ the specific language governing permissions and limitations under the Apache Lic
self.highlight(0); self.highlight(0);
} }
//If all results are chosen render formatNoMAtches
if(!this.opts.createSearchChoice && !choices.filter('.select2-result:not(.select2-selected)').length > 0){
this.results.append("<li class='select2-no-results'>" + self.opts.formatNoMatches(self.search.val()) + "</li>");
}
}, },
// multi // multi