isteven / angular-multi-select

A multi select dropdown directive for AngularJS. Allows you to use HTML tags and CSS in the data. Requires only AngularJS and nothing else.
isteven.github.io/angular-multi-select
MIT License
1.08k stars 518 forks source link

on-search-change not working ? #239

Open Lausebengel opened 9 years ago

Lausebengel commented 9 years ago

Hello,

I have the following multi select definition :

<div    
                        isteven-multi-select 
                        input-model="input"    
                        output-model="output"
                        button-label="name"
                        item-label="name"
                        tick-property="ticked"
                        helper-elements="filter"
                        orientation="vertical"
                        translation="translateMultiselect"
                        tabindex="1"
                        selection-mode="single"
                        on-search-change="filterSearch(data)"
                    >
                    </div> 

My controller method looks like:

 $scope.filterSearch = function (query) {
        console.log(query.keyword);
  };

But in console nothing is logged ... what have I done wrong ? I have recognized an error in the console:

TypeError: Cannot read property 'getElementsByTagName' of undefined at h.link.$scope.getFormElements (isteven-multi-select.js:235)

Maybe that is the reason ?

Thanks in advance

isteven commented 9 years ago

Hi @oliver13 ,

Yeah it's a problem I'm trying to fix. Related with issue #201.