Skip to content

Commit

Permalink
Fix no match search issue on backspace.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Humphreys committed Aug 23, 2017
1 parent 5e76def commit baf3df5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
8 changes: 6 additions & 2 deletions dist/tribute.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions example/index.html
Expand Up @@ -85,9 +85,6 @@ <h5>Tribute on traditional form elements!</h5>
}

return '@' + item.original.value;
},
noMatchTemplate: function (tribute) {
return '<li>No match!</li>';
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/Tribute.js
Expand Up @@ -51,7 +51,7 @@ class Tribute {
return t.bind(this)
}

return null
return function () {return '<li>No match!</li>'}.bind(this)
})(noMatchTemplate),

// column to search against in the object
Expand Down
2 changes: 2 additions & 0 deletions src/TributeRange.js
Expand Up @@ -443,6 +443,8 @@ class TributeRange {
let maxScrollDisplacement = 100
let e = this.menu

if (typeof e === 'undefined') return;

while (clientRect === undefined || clientRect.height === 0) {
clientRect = e.getBoundingClientRect()

Expand Down

0 comments on commit baf3df5

Please sign in to comment.