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

Commit 070a682

Browse files
author
Kamil Kisiela
committed
add missing apiChecks to select, radio and label
1 parent 77002ac commit 070a682

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55
## [Unreleased]
66
### Added
77
- Support for textarea with cols and rows
8+
- ApiCheck for label, radio and select
89

910
## [0.1.0] - 2015-11-17
1011
### Added

lib/client/types/radio/radio.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ SetModule('formlyMaterial')
55

66
formlyConfigProvider.setType({
77
name: 'radio',
8-
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/radio/radio.ng.html')
8+
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/radio/radio.ng.html'),
9+
apiCheck: (check) => ({
10+
templateOptions: {
11+
options: check.arrayOf(check.object),
12+
labelProp: check.string.optional,
13+
valueProp: check.string.optional
14+
}
15+
})
916
});
1017

1118
});

lib/client/types/select/select.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ SetModule('formlyMaterial')
66
formlyConfigProvider.setType({
77
name: 'select',
88
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/select/select.ng.html'),
9-
wrapper: ['mdLabel', 'mdMessages', 'mdInputContainer']
9+
wrapper: ['mdLabel', 'mdMessages', 'mdInputContainer'],
10+
apiCheck: (check) => ({
11+
templateOptions: {
12+
options: check.arrayOf(check.object),
13+
labelProp: check.string.optional,
14+
valueProp: check.string.optional
15+
}
16+
})
1017
});
1118

1219
});

lib/client/wrappers/label/label.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ SetModule('formlyMaterial')
55

66
formlyConfigProvider.setWrapper({
77
name: 'mdLabel',
8-
templateUrl: formlyMaterialProvider.templateUrl('lib/client/wrappers/label/label.ng.html')
8+
templateUrl: formlyMaterialProvider.templateUrl('lib/client/wrappers/label/label.ng.html'),
9+
apiCheck: (check) => ({
10+
templateOptions: {
11+
label: check.string
12+
}
13+
})
914
});
10-
15+
1116
});

0 commit comments

Comments
 (0)