Permalink
Browse files

Add ability to turn off text field auto resizing. allowNewResult

  • Loading branch information...
1 parent 314b84d commit 320829ce752f32347c197fd1f1888f477355d0f9 @thekevinscott committed Sep 26, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/jquery.tokeninput.js
View
2 src/jquery.tokeninput.js
@@ -32,6 +32,7 @@ var DEFAULT_SETTINGS = {
deleteText: "×",
animateDropdown: true,
theme: null,
+ allowResizeInput: true,
resultsFormatter: function(item){ return "<li>" + item[this.propertyToSearch]+ "</li>" },
tokenFormatter: function(item) { return "<li><p>" + item[this.propertyToSearch] + "</p></li>" },
@@ -434,6 +435,7 @@ $.TokenList = function (input, url_or_data, settings) {
}
function resize_input() {
+ if(! settings.allowResizeInput) {return;}
if(input_val === (input_val = input_box.val())) {return;}
// Enter new content into resizer and resize input accordingly

0 comments on commit 320829c

Please sign in to comment.