wenzhixin/multiple-select

getSelects() undefined is not iterable

Closed this issue · 2 comments

Summary
When calling 'getSelects' / 'setSelects' methods, get an error message:

Uncaught TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)
    at a (modules.js?hash=59ced33a08568008ca6aa6151312e8c1a0bcaa3a:35668:2387)
    at n.value (modules.js?hash=59ced33a08568008ca6aa6151312e8c1a0bcaa3a:35668:59163)
    at HTMLDivElement.<anonymous> (modules.js?hash=59ced33a08568008ca6aa6151312e8c1a0bcaa3a:35668:63777)
    at Function.each (modules.js?hash=59ced33a08568008ca6aa6151312e8c1a0bcaa3a:36094:19)
    at jQuery.fn.init.each (modules.js?hash=59ced33a08568008ca6aa6151312e8c1a0bcaa3a:35916:17)
    at $.fn.multipleSelect (modules.js?hash=59ced33a08568008ca6aa6151312e8c1a0bcaa3a:35668:63515)

Context
I am using last 1.7.0 version of multiple-select, inside a Meteor 2.13.3 application using Blaze templating.
HTML Code

 <select class="multiple-select js-authent w-100" multiple="multiple" title="{{ i18n key="organizations.panel.authent_title" }}">
     {{#each it in authentList }}
         <option value="{{ authentValue it }}" {{ authentSelected it }} {{ authentDisabled it }}>{{ authentLabel it }}</option>
     {{/each}}
 </select>

JS

 self.$( '.js-authent' ).multipleSelect({
     selectAll: false,
     classes: 'form-control',
     onClick( data ){
         console.debug( self.$( '.js-authent' ).multipleSelect( 'getSelects' ));
     }
 });

This is probably a misuse of mine, but I do not see where I am wrong ?
Could someone help, please ?

That works !
Thanks a lot for your work, and your help.
Best regards
Pierre