Skip to content

AsyncRequest event missing argument ... when it should not be fired at all #68

Open

Description

@yanickrochon

I am trying to set the value of a text field that is being used as typeahead. Because I don't want to trigger a query from Bloodhound, I'm using this line

element.data('ttTypeahead').input.setQuery(newValue, true);

However, Bloodhound is still trying to fetch some data, even though the silent option is being passed. In fact, typeahead:asyncrequest is still being fired, but with a single argument. I tried debugging, and it seems that the event is being called with dataset = undefined, which cause this behavior.

The point is, how to set the value of the input field without triggering the suggestion menu to open, or even Bloodhound from performing an async request?

All and all, there is a problem at the moment and things are not working as expected.

Activity

  1. changed the title [-]AsyncRequest event missing argument ... when it should be be fired at all[/-] [+]AsyncRequest event missing argument ... when it should not be fired at all[/+] on Mar 7, 2016
  2. jisotalo commented on Nov 27, 2016

    @jisotalo

    I noticed this too. Only first parameter is available in the next function and the others are undefined. Document says they should be available.
    bind('typeahead:asyncrequest', function(a, b, c) { //b and c are undefined });

  3. jlbooker commented on Nov 30, 2016

    @jlbooker
    Contributor

    @jisotalo Which version of typeahead are you using? The latest release includes #65, which sounds related to this issue.

  4. jisotalo commented on Dec 1, 2016

    @jisotalo

    I am using bundle file typeahead.js 1.0.1 that I downloaded from https://raw.githubusercontent.com/corejavascript/typeahead.js/master/dist/typeahead.bundle.min.js.

  5. added this to the v1.1.0 milestone on Dec 1, 2016
  6. modified the milestones: v1.1.0, v1.2.0 on Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions