axel-zarate / js-custom-select

Custom auto-complete select box for AngularJS and Bootstrap
MIT License
68 stars 59 forks source link

extra parameter on asyncOptions onsearch function #8

Closed sameer777 closed 9 years ago

sameer777 commented 9 years ago

HIi,,

I am using custom-select directive for ajax search in select box but I need extra parameter. In your function onSearch function accepts only one parameter. How we can use extra parameter in onSearch function which is coming from client Side. How we can send extra parameter from client side to this onSearch function.

ex:onSearch:function(term,extra parameter here){ //logic here }

$scope.asyncOptions ={

                onSearch: function (term,col) {

                    return $http.post("autocomplete",{winName:$scope.entity2.name,winId:$localStorage.message,search:term,columnName:col}).then(function(response){
                        $scope.autoData=response.data.options;
                        //return limitToFilter(response.data.options, 15);
                    });

                }
            };

Thanks,

Sameer F. Tadvi

axel-zarate commented 9 years ago

Hello, The question here is what that extra parameter means and where it comes from? Is it something from somewhere else in your business logic or from the directive itself?

axel-zarate commented 9 years ago

Closed due to inactivity.