Skip to content
This repository was archived by the owner on Jan 22, 2018. It is now read-only.

Commit 8696615

Browse files
author
Kamil Kisiela
committed
Add multiple support in select field
1 parent 69518f3 commit 8696615

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

CHANGELOG.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [Unreleased]
6+
### Added
7+
- multiple support for select field
8+
59
## [0.4.0] - 2015-11-17
610
### Added
711
- **md-chip** with placeholder, secondary-placeholder, delete-button-label and delete-hint
@@ -51,10 +55,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5155

5256
## 0.0.1 - 2015-11-06
5357

54-
[0.4.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.3.0...v0.4.0
55-
[0.3.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.2.0...v0.3.0
56-
[0.2.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.1.0...v0.2.0
57-
[0.1.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.4...v0.1.0
58-
[0.0.4]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.3...v0.0.4
59-
[0.0.3]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.2...v0.0.3
60-
[0.0.2]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.1...v0.0.2
58+
[Unreleased]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.4.0...HEAD
59+
[0.4.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.3.0...v0.4.0
60+
[0.3.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.2.0...v0.3.0
61+
[0.2.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.1.0...v0.2.0
62+
[0.1.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.4...v0.1.0
63+
[0.0.4]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.3...v0.0.4
64+
[0.0.3]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.2...v0.0.3
65+
[0.0.2]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.1...v0.0.2

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,16 @@ md-theme attribute
103103

104104
**valueProp (string, optional)**
105105

106+
**multiple (boolean, optional**
107+
106108
```javascript
107109
{
108110
"type": "select",
109111
"key": "name",
110112
"templateOptions": {
111113
"label": "Name",
112114
"theme": "custom",
115+
"multiple": true,
113116
"labelProp": "firstName",
114117
"valueProp": "id",
115118
"options": [
@@ -228,6 +231,7 @@ delete-hint attribute value
228231
- [x] add md-datepicker
229232
- [ ] add md-icon wrapper
230233
- [x] add md-select
234+
- [x] multiple in md-select
231235
- [ ] add groups to md-select
232236
- [x] add valueProp, labelProp to md-select
233237
- [x] add md-radio with valueProp and labelProp

lib/client/types/select/select.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ SetModule('formlyMaterial')
77
name: 'select',
88
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/select/select.ng.html'),
99
wrapper: ['label', 'messages', 'inputContainer'],
10+
defaultOptions: {
11+
ngModelAttrs: {
12+
multiple: {bound: 'multiple'}
13+
}
14+
},
1015
apiCheck: (check) => ({
1116
templateOptions: {
1217
options: check.arrayOf(check.object),
18+
multiple: check.bool.optional,
1319
labelProp: check.string.optional,
1420
valueProp: check.string.optional
1521
}

0 commit comments

Comments
 (0)