@@ -43,7 +43,7 @@ const processItems = function (groupItems, field) {
4343
4444 if ( field . filterValues ) {
4545 each ( field . filterValues , ( _ , filterValue ) => {
46- filterValues . push ( Array . isArray ( filterValue ) ? filterValue . join ( '/' ) : filterValue && filterValue . valueOf ( ) ) ;
46+ filterValues . push ( Array . isArray ( filterValue ) ? filterValue . join ( '/' ) : filterValue ? .valueOf ( ) ) ;
4747 } ) ;
4848 }
4949
@@ -53,7 +53,7 @@ const processItems = function (groupItems, field) {
5353 const preparedFilterValueByText = isTree ? map ( items , ( item ) => item . text ) . reverse ( ) . join ( '/' ) : item . text ;
5454
5555 item . value = isTree ? path . slice ( 0 ) : item . key || item . value ;
56- const preparedFilterValue = isTree ? path . join ( '/' ) : item . value && item . value . valueOf ( ) ;
56+ const preparedFilterValue = isTree ? path . join ( '/' ) : item . value ? .valueOf ( ) ;
5757
5858 if ( item . children ) {
5959 item . items = item . children ;
@@ -133,8 +133,7 @@ export class FieldChooserBase extends mixinWidget {
133133 _refreshDataSource ( ) {
134134 const dataSource = this . option ( 'dataSource' ) ;
135135
136- if ( dataSource
137- && dataSource . fields && dataSource . load /* instanceof DX.ui.dxPivotGrid.DataSource */ ) {
136+ if ( dataSource ?. fields && dataSource . load /* instanceof DX.ui.dxPivotGrid.DataSource */ ) {
138137 this . _dataSource = dataSource ;
139138 }
140139 }
@@ -189,6 +188,7 @@ export class FieldChooserBase extends mixinWidget {
189188 alignment : that . option ( 'rtlEnabled' ) ? 'right' : 'left' ,
190189 sortOrder : field . sortOrder === 'desc' ? 'desc' : 'asc' ,
191190 allowSorting : field . allowSorting ,
191+ caption : field . caption || field . dataField ,
192192 } ,
193193 showColumnLines,
194194 } ) ;
@@ -202,6 +202,7 @@ export class FieldChooserBase extends mixinWidget {
202202 filterValues : mainGroupField . filterValues ,
203203 allowFiltering : mainGroupField . allowFiltering && ! field . groupIndex ,
204204 allowSorting : field . allowSorting ,
205+ caption : field . caption || field . dataField ,
205206 } ,
206207 showColumnLines,
207208 } ) ;
0 commit comments