* @method searchOptions * @private
( event )
| 931 | * @private |
| 932 | */ |
| 933 | _searchOptions( event ) { |
| 934 | var results, |
| 935 | self = this, |
| 936 | keyChar = String.fromCharCode( event.keyCode || event.which ), |
| 937 | |
| 938 | waitToReset = function() { |
| 939 | if ( self.data.searchTimeout ) { |
| 940 | clearTimeout( self.data.searchTimeout ); |
| 941 | } |
| 942 | |
| 943 | self.data.searchTimeout = setTimeout(function() { |
| 944 | self.data.searchString = ""; |
| 945 | }, 1000 ); |
| 946 | }; |
| 947 | |
| 948 | if ( this.data.searchString === undefined ) { |
| 949 | this.data.searchString = ""; |
| 950 | } |
| 951 | |
| 952 | waitToReset(); |
| 953 | |
| 954 | this.data.searchString += keyChar; |
| 955 | results = this.search( this.data.searchString, this.data.settings.search ); |
| 956 | |
| 957 | if ( results.length ) { |
| 958 | if ( !_.hasClass( results[0], "dk-option-disabled" ) ) { |
| 959 | this.selectOne( results[0] ); |
| 960 | } |
| 961 | } |
| 962 | } |
| 963 | |
| 964 | /** |
| 965 | * @method scrollTo |
no test coverage detected