0

I am currently in the process of switching form BootsTrap 2.3 to Bootstrap 3.0. As we all know, there is no typeahead in the bootstrap 3.0 so I am using the twitter one: https://github.com/twitter/typeahead.js/

I am able to query but for some reason, the query is not being updated...

Here is the code:

    $('.typeahead').typeahead([
  {
    name: 'users',
    prefetch: '../user/generate-users-typeahead',
    remote: '../user/generate-users-typeahead',
    limit: 5
  },
])

For example, if we start entering Exa there will still be results with the username Admin for example...

Any ideas why it is doing that?

Thanks, Ara

5
  • Maybe your localStorage contains "old" data, see also: stackoverflow.com/questions/7667958/clear-localstorage Commented Aug 23, 2013 at 20:37
  • I am not sure what you mean... I thought the typeahead will automatically clear those?!?!?!? Commented Aug 23, 2013 at 22:05
  • no it store the data (json) in the localstorage. You could set a ttl for it. Try your code without prefetch. Commented Aug 23, 2013 at 22:45
  • I tried without the prefecth, it didnt fix it. I'll try and setting a ttl. Commented Aug 24, 2013 at 21:50
  • Have you tried disabling the cache property for remote since this is using jQuery.ajax() under the hood. Commented Sep 29, 2013 at 23:56

1 Answer 1

1

Try clearing the Local storage localStorage.clear();

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.