Premium support for our pure JavaScript UI components


Post by abisht »

Angular version - 8.12.14
Bryntum version - 3.0.3

Below code i added in the html and it is enabling the all the columns. Is there any config change required to enable for specific column?

<bry-scheduler
[filterBarFeature]="'true'" >
</bry-scheduler>


Post by alex.l »

All the best,
Alex


Post by abisht »

Is there any event which will trigger only on filter change?


Post by alex.l »

All the best,
Alex


Post by abisht »

On change of filter value i need to call the backed API and get new set of filter data. I was doing on onSchedulerEvents(event),checking for the event.type = 'resourceschange' then calling API. But this is going in loop because resourceschange type is calling when action is filter and dataset. dataset is again calling filter action.

is there any way to handle the Filterchanges to call backend api ?


Post by abisht »

How to handle the server side filtering?


Post by abisht »

Hi Alex,

Below is my config file. I want to filter on driver Name. On each keypress i need to call the API and show the result on UI.
Is this possible.?

columns: [{
      text: 'Driver',
      field: 'name',
filterable: ({ record ,value}) =>  {
        this.FiltersChanged(value);
        return record;
      }
}
]
public FiltersChanged(event: any) { 
	http call 
}

Post by alex.l »

Better to enable remote filtering and just send your filter params with store reload, handle it on the server side and return filtered data.
All you need to enable remote filtering is define https://bryntum.com/docs/grid/api/Core/data/AjaxStore#config-filterParamName for your store.
Docs here: https://bryntum.com/docs/grid/api/Core/data/AjaxStore#remote-filtering

All the best,
Alex


Post by abisht »

Hi alex,

Thanks for support. one more issue i am facing.

{
      text: 'Driver',
      field: 'name',
      htmlEncode: false,
      filterable: {
        filterFn: ({ record, value }) => value,
        keyStrokeFilterDelay: 600,
        filterField: {
          emptyText: 'Filter name',
          listeners: {
            input: (event: any) => {
              this.onFiltersChanged(event.value);
            }
          }
        }
      },
      resizable: false,
      editor: false,
      width: 100,
      draggable: false,

i am using listeners on input. i am able to filter the from api able to bind the data to UI. after the bind it is clearing the filter text.
Is there any way to not to clear the filter text?


Post by alex.l »

Did you return your filters data back in your response? It should be re-applied from the data.

All the best,
Alex


Post Reply