ssuperczynski / ngx-easy-table

The Easiest Angular Table. 12kb gzipped! Tree-shakeable. 55 features and growing!
https://ngx-easy-table.eu
MIT License
376 stars 101 forks source link

Server sorting is not working #436

Open ashot-developer opened 2 months ago

ashot-developer commented 2 months ago
    this.configuration = { 
      ...DefaultConfig, 
      threeWaySort: true,
      serverPagination: true,
      searchEnabled: false, 
      isLoading: this.loading,
      additionalActions: true,
      rows: DEFAULT_PAGE_SIZE,
      paginationEnabled: false,
      paginationRangeEnabled: false,
      resizeColumn: true,
      fixedColumnWidth: false
    };

      public eventEmitted(event: { event: string; value: any }): void {
    console.log(event);
    if (event.event !== 'onClick') {
      this.parseEvent(event);
    }
  }

  private parseEvent(obj: EventObject): void {
    this.customPagination.limit = obj.value.limit ? obj.value.limit : this.customPagination.limit;
    this.customPagination.offset = obj.value.page ? obj.value.page : this.customPagination.offset;
    this.customPagination.sort = !!obj.value.key ? obj.value.key : this.customPagination.sort;
    this.customPagination.order = !!obj.value.order ? obj.value.order : this.customPagination.order;
    this.customPagination = { ...this.customPagination };
    // see https://github.com/typicode/json-server
    const pagination = `_limit=${this.customPagination.limit}&_page=${this.customPagination.offset}`;
    const sort = `&_sort=${this.customPagination.sort}&_order=${this.customPagination.order}`;
  }
this is my configuration, but on clicking column's labeles only working **onColumnResizeMouseUp** and **onColumnResizeMouseDown** events.
ashot-developer commented 2 months ago

We are using "ngx-easy-table": "^15.4.0"