@@ -340,9 +340,7 @@ export class GraphqlService implements BackendService {
340340 // if user defined some "presets", then we need to find the filters from the column definitions instead
341341 let columnDef : Column | undefined ;
342342 if ( isUpdatedByPreset && Array . isArray ( this . _columnDefinitions ) ) {
343- columnDef = this . _columnDefinitions . find ( ( column : Column ) => {
344- return column . id === columnFilter . columnId ;
345- } ) ;
343+ columnDef = this . _columnDefinitions . find ( ( column : Column ) => column . id === columnFilter . columnId ) ;
346344 } else {
347345 columnDef = columnFilter . columnDef ;
348346 }
@@ -447,8 +445,9 @@ export class GraphqlService implements BackendService {
447445
448446 // display the correct sorting icons on the UI, for that it requires (columnId, sortAsc) properties
449447 const tmpSorterArray = currentSorters . map ( ( sorter ) => {
448+ const columnDef = this . _columnDefinitions . find ( ( column : Column ) => column . id === sorter . columnId ) ;
450449 graphqlSorters . push ( {
451- field : sorter . columnId + '' ,
450+ field : ( columnDef . queryField || columnDef . queryFieldSorter || columnDef . field || columnDef . id ) + '' ,
452451 direction : sorter . direction
453452 } ) ;
454453 return {
@@ -468,7 +467,7 @@ export class GraphqlService implements BackendService {
468467 for ( const column of sortColumns ) {
469468 if ( column && column . sortCol ) {
470469 currentSorters . push ( {
471- columnId : ( column . sortCol . field || column . sortCol . id ) + '' ,
470+ columnId : column . sortCol . id + '' ,
472471 direction : column . sortAsc ? SortDirection . ASC : SortDirection . DESC
473472 } ) ;
474473
0 commit comments