SlickGrid Universal 5.2.0, ‘preProcess’ and ‘process’ does not work as expected on init process

I created a BackendService for Salesforce with SlickGrid Universal 5.2.0. And I was insert the console.log into the every functions to confirm execution order.

Here is BackendService.js I tested. I didn’t add any business logic into BackendService, only console.log added. So I just want to confirm execution order.

export class BackendService {

    options = { ... }

    init(serviceOptions, pagination, grid, sharedService){

        ...

        console.log('backend service init finished');

    }

    updateFilters(columnFilters, isUpdateedByPresetOrDynamically){

        console.log('backend service updateFilters method');

    }

    updateSoters with just console.log like updateFilters;

    updatePagination with just console.log like updateFilters;

    updateOptions with just console.log like updateFilters;

    buildQuery(){

        console.log('backend service buildQuery');
        return 'SELECT Id, NAME FROM Account';

    }

    postProcess(respone){

       console.log('backend service internalPostProcess ', response);

    }

    processOnFilterChanged(..){
       console.log('backend service onFilterChanged');
       return this.buildQuery();
    }
    processOnSorterChanged(..){
       console.log('backend service onSorterChanged');
       return this.buildQuery();
    }
    processOnPaganationChanged(..){
       console.log('backend service onPaganationChanged');
       return this.buildQuery();
    }

}

And, here is gridOptions

gridOptions = {

    ...,

    presets : {

        ...

    },

    backendServiceApi : {

        service : new BackendService();

        options : { ... },

        preProcess: () => {

            console.log('backend servie preProcess');

        },

        process: (query) => {

            console.log('backend service process ', query);
            return [];

        }

        postProcess: (response) => {

            console.log('backend service postProcess ', response);

        }

    }
};

console.log('grid initialization start');
this.grid = new GridBundle(el, columns, gridOptions, []);
console.log('grid intialized -> ', this.grid)

It is run as following orders at initialization of grid.

  1. ‘grid initialization start’ log displayed.
  2. service.init()
  3. service.options.preset(filters, sorters, pagiantion)
  4. service.buildQuery()
  5. service.process() – with result of buildQuery()
  6. At this time, ‘grid intialized -> grid object’ log is displayed.
  7. service.preProcess()
  8. service.PreProcess() again
  9. service.processOn***Changed event
  10. service.process() – with null
  11. service.internalPostProcess()
  12. service.postProcess()

Excution order of the function ‘bindBackendCallbackFunctions()’ in the source code ‘slick-vanilla-grid-bundle.ts’ is correct I think.
preset > buildQuery > preProcess > process.

However, real excution order is different as below.
preset > buildQuery > process > preProcess, how can I solve this?

I believe correct execution orders are:

For onInit exection order :
init > preset > buildQuery > preProcess > process > internalPostProcess > postProcess

For event excution order :
preProcess > eventHandler > buildQuery > process > internalPostProcess > postProcess

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật