Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
While loading a state, sorting and filtering events will be fired as many times as the number of columns I have in my grid
posted
In our web project we have to occasionally save and load grid states. After implementing the functionality, which fetches a grid state from back-end and loads it, I saw that an angular component makes around 100 back-end requests. I checked what was happenning and have seen that everytime a state gets loaded the ignite-grid component fires as much filtering and sorting events as the number of columns it has. To avoid that weird functionality I had to write the following garbage code, which has nothing to do with the program logic. It just tries to prevent calling a back-end function a hundred times.
handleFilterChanges(event) {
    if(this.dummyFilterings>0)this.dummyFilterings--
    else
    {
      this.reqModel.filters = this.utilityService.getFiltersOutOfGrid(this.grid)
      this.reqModel.limit = this.grid.perPage
      this.getData()
    }
  }
Can you guys please resolve this issue by changing the grid-component so that it fires just one filtering and one sorting event?
Parents Reply Children
No Data