Premium support for our pure JavaScript UI components


Post by abisht »

Any example how i need to reapply ?


Post by abisht »

Any way to retain the filter value and show it on the UI


Post by alex.l »

I think I misunderstood your question. I don't see that filterBar state is cleared after data reload.
Could you please make a small test case that we can run and debug?

All the best,
Alex


Post by abisht »

Hi Alex,

'resourcesrefresh' event is getting triggered and setting filter value to empty.

i have add the below add in angular ts file

this.schedulerConfig.columns.filter(column  => {
      let changesValue ;
      if (column.field === 'name') {
        column.filterable['filterField']['listeners'] = {
          input: (event: any) => {
            if(event){
              this.onFiltersChanged(event.value);
            } 
          }
        }
      }
      return column;
    });
    onFiltersChanged(filterInput){
    i have http call and getting filtered data from backend and binding to ui
    } 
    
after this resourcesrefresh is calling and filterbar state is getting cleared

Thanks


Post by alex.l »

What is resourcesrefresh event?
It looks like you re-apply configs for columns. In that case if it's recreated, you have to take care by your own about data in filterBar.
I cannot say a lot by this code fragment. Just try to save and re-apply data after your refresh using? To get the field, use https://bryntum.com/docs/grid/api/Grid/feature/FilterBar#function-getColumnFilterField

All the best,
Alex


Post Reply