Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

attrs.multiple is string, isn't it? #79

Open
kityan opened this issue Jan 16, 2016 · 2 comments
Open

attrs.multiple is string, isn't it? #79

kityan opened this issue Jan 16, 2016 · 2 comments

Comments

@kityan
Copy link

kityan commented Jan 16, 2016

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

@amitava82
Copy link
Owner

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.

@kityan
Copy link
Author

kityan commented Jan 18, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants