1
0
mirror of synced 2024-11-23 05:26:10 +03:00

Merge pull request #1336 from igaidai4uk/patch-1

Remove duplication of "No matches found" message
This commit is contained in:
Igor Vaynberg 2013-05-21 08:37:39 -07:00
commit 78e686c23b

View File

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