File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ export default class CheckBox extends Component {
58
58
}
59
59
60
60
_renderImage ( ) {
61
+ if ( this . props . isIndeterminate ) {
62
+ return this . props . indeterminateImage ? this . props . indeterminateImage : this . genCheckedImage ( ) ;
63
+ }
61
64
if ( this . props . isChecked ) {
62
65
return this . props . checkedImage ? this . props . checkedImage : this . genCheckedImage ( ) ;
63
66
} else {
@@ -66,7 +69,13 @@ export default class CheckBox extends Component {
66
69
}
67
70
68
71
genCheckedImage ( ) {
69
- var source = this . props . isChecked ? require ( './img/ic_check_box.png' ) : require ( './img/ic_check_box_outline_blank.png' ) ;
72
+ var source ;
73
+ if ( this . props . isIndeterminate ) {
74
+ source = require ( './img/ic_indeterminate_check_box.png' ) ;
75
+ }
76
+ else {
77
+ source = this . props . isChecked ? require ( './img/ic_check_box.png' ) : require ( './img/ic_check_box_outline_blank.png' ) ;
78
+ }
70
79
71
80
return (
72
81
< Image source = { source } style = { { tintColor : this . props . checkBoxColor } } />
You can’t perform that action at this time.
0 commit comments