Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added some missing documentation

Renamed max_displayed_tags option to max_results
  • Loading branch information...
commit 9f55037e8ea89816fbe226c13212a87bec487be6 1 parent 0d58235
Rick Fletcher authored

Showing 1 changed file with 7 additions and 5 deletions. Show diff stats Hide diff stats

  1. +7 5 src/lib/Tagbox.Autocomplete.js
12 src/lib/Tagbox.Autocomplete.js
@@ -11,12 +11,12 @@ Tagbox.Autocomplete = Class.create( {
11 11 * display_on_down_arrow (Boolean) = true:
12 12 * Display the unfiltered list of tags when the user presses the down
13 13 * arrow and the text input is empty.
14   - * max_displayed_tags (Boolean) = 10:
15   - *
  14 + * max_results (Boolean) = 10:
  15 + * Maximum number of results to show in the autocomplete list.
16 16 **/
17 17 options: {
18 18 display_on_down_arrow: true,
19   - max_displayed_tags: 6
  19 + max_results: 6
20 20 },
21 21
22 22 /**
@@ -63,7 +63,9 @@ Tagbox.Autocomplete = Class.create( {
63 63 },
64 64
65 65 /**
66   - *
  66 + * Tagbox.Autocomplete#getSelectedTag() -> Tagbox.Tag
  67 + *
  68 + * Get the Tagbox.Tag object corresponding to the highlighted result.
67 69 **/
68 70 getSelectedTag: function() {
69 71 if( ! this.element.visible() || ! this.element.down( 'li.tagbox-selected' ) ) {
@@ -287,7 +289,7 @@ Tagbox.Autocomplete = Class.create( {
287 289
288 290 var last_item_to_display = Math.min(
289 291 this.results.length,
290   - this.options.get( 'max_displayed_tags' ) ? this.options.get( 'max_displayed_tags' ) : this.results.length
  292 + this.options.get( 'max_results' ) ? this.options.get( 'max_results' ) : this.results.length
291 293 );
292 294
293 295 // add to result list

0 comments on commit 9f55037

Please sign in to comment.
Something went wrong with that request. Please try again.