Commits

Mark Lavin committed dc6dcf3

Don't highlight matches when there is no search term (in the case of the combobox). Fixes #74

  • Participants
  • Parent commits 82ab739
  • Branches stable

Comments (0)

Files changed (1)

selectable/static/selectable/js/jquery.dj.selectable.js

                 if (self.options.formatLabel) {
                     label = self.options.formatLabel(label, item);
                 }
-                if (self.options.highlightMatch) {
+                if (self.options.highlightMatch && this.term) {
                     var re = new RegExp("(?![^&;]+;)(?!<[^<>]*)(" +
                     $.ui.autocomplete.escapeRegex(this.term) +
                     ")(?![^<>]*>)(?![^&;]+;)", "gi");