2.1.0 wip showall #3941

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
8 participants

gsf commented Jun 26, 2012

Refs #2043, #3913, #2474

Owner

fat commented Jul 22, 2012

Hey @gsf,

Thanks for opening this pull-request! Unfotunately, it looks like it fails to pass the tests neccessary for submitting to bootstrap. The following tests are currently failing:

  • should always include a unit test if changing js files

For a full list of issue filing guidelines, please refer to the bootstrap issue filing guidelines.

thanks!

@fat fat closed this Jul 22, 2012

Owner

fat commented Jul 22, 2012

super sorry - there was a bug in the script i just ran.

@fat fat reopened this Jul 22, 2012

This pull request passes (merged 9b760c1 into b77ed4a).

Owner

fat commented Jul 22, 2012

If you want this behavior, you can actually add it now with just 1 line of js - so i'm not sure we need it in the core of the library.

$input.on('focus', $input.typeahead.bind($input, 'lookup')));

@fat fat closed this Jul 22, 2012

gsf commented Jul 23, 2012

Great to know. Thanks!

Great! it's a also a good idea to change overwrite the bootstrap typeahead css class locally to set max-height and vertical scroller for the results in case there are too many.

.typeahead {
max-height: 200px;
overflow-y: auto;
overflow-x: hidden;
}

Another cosmetic enhancement would be setting the min-width of the drop-down to match the width of the element.

show: function () {
      this.$menu.css('min-width', (this.$element.width()) + 'px')
}

abenrob commented Apr 10, 2013

Where do I implement this line of code?

$input.on('focus', $input.typeahead.bind($input, 'lookup')));

@abenrob: You need to replace input with the selector for your typeahead input. For example:

$("#typeaheadField").on('focus', $("#typeaheadField").typeahead.bind($("#typeaheadField"), 'lookup'));

Then place it after

$(document).ready(function () {

Unfortunately in my case adding this line (with focus or click as the event) and setting minLength to 0 has no influence. The list opens only after I start typing.

So @fat I can't get your one-liner to work, apparently @barbalex can't either. Any thoughts? Thanks

I also used the suggested code, doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment