angular-multiselect icon indicating copy to clipboard operation
angular-multiselect copied to clipboard

attrs.multiple is string, isn't it?

Open kityan opened this issue 9 years ago • 2 comments

isMultiple = attrs.multiple ? true : false always true because attrs.multiple is string, no? here: https://github.com/amitava82/angular-multiselect/blob/master/src/multiselect.js#L41

kityan avatar Jan 16 '16 10:01 kityan

You are right but then one would add multiple attribute for multi select and not add it for single select. However I think it can be enhanced to allow programmatic switching between single/multiselect.

amitava82 avatar Jan 18 '16 08:01 amitava82

Yes, definitely! I've not thinked about not adding attribute at all. That's because I use this method: if attribute can be ignored I write <element attr /> or <element attr="attr" />. But If <element attr="true"> than value has to be correctly transformed to Boolean.

Thanks for your directive. It was very helpful.

kityan avatar Jan 18 '16 09:01 kityan