Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

Add "multiSelect" field type #47

Open
rowanmoul opened this issue Aug 24, 2015 · 2 comments
Open

Add "multiSelect" field type #47

rowanmoul opened this issue Aug 24, 2015 · 2 comments

Comments

@rowanmoul
Copy link

I implemented this myself with very minimal effort. Would be great to see this in here by default.
This is my implementation:

formlyConfig.setType({
                name: 'multiSelect',
                extends: 'select',
                template: '<select multiple class="form-control" ng-model="model[options.key]"></select>'
            });

I would gladly turn this into a pull request, but I'm fairly new to Javascript and I'm not sure how I would write tests for this.

@rowanmoul
Copy link
Author

Here us a JS Bin with an example:
http://jsbin.com/reheko/edit?html,js,output

@kentcdodds
Copy link
Member

Awesome! I'd happily accept a PR for this. I'm not sure how I'd test this one either. But I'll go ahead and accept a PR for this even without tests. (This repo isn't set up with tests yet anyway).

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

No branches or pull requests

2 participants