Bootstrap 3 typeahead.js - query by part of typeahead val

后端 未结 2 2088
孤城傲影
孤城傲影 2021-01-04 18:19

I\'m trying to call my remote url with last part of input value. I would like to do something like this:

    $(\'#typeahead\').typeahead({
    remote: {
             


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-04 18:54

    Assuming that "query with the last part" works for you, you can use filter: function(response) {...} to populate and return an array of datums that have appropriate value and title to do what you want.

提交回复
热议问题