axel-zarate/js-custom-select

extra parameter on asyncOptions onsearch function

Closed this issue · 2 comments

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

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?

Closed due to inactivity.