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

Commit bdbe651

Browse files
author
Kamil Kisiela
committed
feat(checkbox): templateOptions.disabled
1 parent aebc2da commit bdbe651

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/types/checkbox/checkbox.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ import template from './checkbox.html';
33
export default (formlyConfigProvider) => {
44
formlyConfigProvider.setType({
55
template,
6-
name: 'checkbox'
6+
name: 'checkbox',
7+
defaultOptions: {
8+
ngModelAttrs: {
9+
disabled: {
10+
bound: 'ng-disabled'
11+
}
12+
}
13+
},
14+
apiCheck: (check) => ({
15+
templateOptions: {
16+
disabled: check.bool.optional
17+
}
18+
})
719
});
820
};

0 commit comments

Comments
 (0)