Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typeahead when using Bootstrap 3 #73

Merged
merged 2 commits into from
Jul 30, 2014
Merged

Fix typeahead when using Bootstrap 3 #73

merged 2 commits into from
Jul 30, 2014

Conversation

wardpeet
Copy link
Contributor

@wardpeet wardpeet commented Jan 7, 2014

I added a typeahead option that works with the new typeahead library. You can use it the same way as typeahead or a simpler way as described in the examples.

$('input').tagsinput({
typeahead: {
remote: 'assets/query.json.html?q=%QUERY'
},
itemValue: 'value',
itemText: 'text'
});

@marsanla
Copy link

marsanla commented Feb 3, 2014

Tim please merge this commit, i tried and is working!! 💯

@wardpeet
Copy link
Contributor Author

wardpeet commented Feb 3, 2014

Thanks, not sure if he is still active..

@cve
Copy link

cve commented Feb 5, 2014

I can not setup it with new typeahead too, any example how to make it work?

@wardpeet
Copy link
Contributor Author

wardpeet commented Feb 5, 2014

$('#tags').tagsinput({
typeahead: {
remote: 'assets/query.json.html?q=%QUERY'
},
itemValue: 'value',
itemText: 'text'
});
what is your code?

@cve
Copy link

cve commented Feb 6, 2014

Are your commits merged with release? Or I have to manualy download your diffs? If I put the code you mention it produces the following error in the console:

Uncaught TypeError: Property '#<Object>' of object #<TagsInput> is not a function 

in bootstrap-tagsinput.js on line 434

@wardpeet
Copy link
Contributor Author

wardpeet commented Feb 6, 2014

it hasn't been merged yet so you have to download the changes manually or clone my repo

@cve
Copy link

cve commented Feb 6, 2014

Ok, thanks for your advises, but it's not working properly, I'm getting to work it through copy all resources and setup it like it is in this example page: view-source:http://timschlechter.github.io/bootstrap-tagsinput/examples/bootstrap3/

@wardpeet
Copy link
Contributor Author

wardpeet commented Feb 6, 2014

can you show me your code?

@igal1c0de4n
Copy link

I found this issue and figured it's related to a problem I'm having:
http://stackoverflow.com/questions/21640772/bootstrap-tagsinput-with-typeahead-bootstrap-3
Since you guys are the tagsinput-typeahead masters I figured I'd share.

Reading this thread I understand that the suggested change re-adds typeahead functionality to bootstrap-tagsinput under bootstrap-3, without the need for external dependencies (i.e. without fetching typeahead.js from http://twitter.github.io/typeahead.js/ into the project )

Is my understanding correct?

@jpm0004
Copy link

jpm0004 commented Mar 10, 2014

I cannot get this working. I took the source code directly from the updated docs you created.

http://jsfiddle.net/jpm0004/s7bPw/

@timschlechter
Copy link
Contributor

I worked on integration the latest typeahead.js in the examples pages so they should be working again.
The solution in this PR, which makes bootstrap-tagsinput agnostic of typeahead.js seems pretty usefull. i will try and update and integrate it, thanks!

@timschlechter timschlechter merged commit 203f9e9 into mdbootstrap:master Jul 30, 2014
@timschlechter
Copy link
Contributor

I modified the solution @wardpeet wrote, to make it work with the current typeahead.js API and merged this PR. Very nice work, thank you very much!

@wardpeet
Copy link
Contributor Author

thanks for merging :)

@ghost
Copy link

ghost commented Oct 7, 2015

Please Can any one share the new Merged File

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants