Commit 0c9dd87 1 parent e4b37bc commit 0c9dd87 Copy full SHA for 0c9dd87
File tree 6 files changed +9
-9
lines changed
6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ export default class BaseComponent {
1090
1090
}
1091
1091
1092
1092
labelIsHidden ( ) {
1093
- return ! this . component . label || this . component . hideLabel || this . options . inputsOnly ;
1093
+ return ! this . component . label || this . component . hideLabel || this . options . inputsOnly || ( this . component . inDataGrid && ! this . component . dataGridLabel ) ;
1094
1094
}
1095
1095
1096
1096
/**
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ export default class ButtonComponent extends BaseComponent {
15
15
action : 'submit' ,
16
16
persistent : false ,
17
17
disableOnInvalid : false ,
18
- theme : 'default'
18
+ theme : 'default' ,
19
+ dataGridLabel : true
19
20
} , ...extend ) ;
20
21
}
21
22
@@ -120,7 +121,7 @@ export default class ButtonComponent extends BaseComponent {
120
121
this . buttonElement . appendChild ( this . text ( ' ' ) ) ;
121
122
}
122
123
123
- if ( this . component . label ) {
124
+ if ( ! this . labelIsHidden ( ) ) {
124
125
this . labelElement = this . text ( this . addShortcutToLabel ( ) ) ;
125
126
this . buttonElement . appendChild ( this . labelElement ) ;
126
127
this . createTooltip ( this . buttonElement , null , this . iconClass ( 'question-sign' ) ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default class CheckBoxComponent extends BaseComponent {
8
8
inputType : 'checkbox' ,
9
9
label : 'Checkbox' ,
10
10
key : 'checkbox' ,
11
- datagridLabel : true ,
11
+ dataGridLabel : true ,
12
12
labelPosition : 'right' ,
13
13
value : '' ,
14
14
name : ''
@@ -75,7 +75,7 @@ export default class CheckBoxComponent extends BaseComponent {
75
75
76
76
createElement ( ) {
77
77
let className = `form-check ${ this . className } ` ;
78
- if ( this . component . label ) {
78
+ if ( ! this . labelIsHidden ( ) ) {
79
79
className += ' checkbox' ;
80
80
}
81
81
this . element = this . ce ( 'div' , {
@@ -135,7 +135,7 @@ export default class CheckBoxComponent extends BaseComponent {
135
135
}
136
136
137
137
createLabel ( container , input ) {
138
- if ( ! this . component . label ) {
138
+ if ( this . labelIsHidden ( ) ) {
139
139
return null ;
140
140
}
141
141
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export default [
75
75
input : true ,
76
76
weight : 440 ,
77
77
label : 'Datagrid Label' ,
78
- key : 'datagridLabel ' ,
78
+ key : 'dataGridLabel ' ,
79
79
tooltip : 'Show the label when in a datagrid.'
80
80
}
81
81
] ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default {
15
15
'protected' : false ,
16
16
'defaultValue' : false ,
17
17
'key' : 'checkme' ,
18
- 'datagridLabel ' : true ,
18
+ 'dataGridLabel ' : true ,
19
19
'label' : 'Check me' ,
20
20
'hideLabel' : false ,
21
21
'tableView' : true ,
Original file line number Diff line number Diff line change @@ -229,7 +229,6 @@ export default class DataGridComponent extends NestedComponent {
229
229
options . name += `[${ rowIndex } ]` ;
230
230
options . row = `${ rowIndex } -${ colIndex } ` ;
231
231
const comp = this . createComponent ( _ . assign ( { } , column , {
232
- label : column . dataGridLabel ? column . label : false ,
233
232
row : options . row
234
233
} ) , options , row ) ;
235
234
comp . rowIndex = rowIndex ;
You can’t perform that action at this time.
0 commit comments