Our blazing fast Grid component built with pure JavaScript


Post by dennisli »

Hi,

I'm in a situation where i have a grid that operates off the eventStore and recordStore of a Scheduler Engine. I can successfully apply a filter to the eventStore/resourceStore, but the changes aren't propagated to Grid component.

  store: {
    masterStore: scheduler.eventStore,
    chainedFilterFn: (record: any) => {
      return record.endDate >= currentDt;
    },
  },

It seems like it's because fillFromMaster ( https://www.bryntum.com/docs/scheduler/#Core/data/mixin/StoreChained#config-chainedFilterFn) filters on masterStore.allRecords instead of masterStore.records

How can I get it to filter on the latter instead, or just generally use the filters of the masterStore?


Post by pmiklashevich »

Hello!

Having independent filters is by design. If you want to filter out records which are filtered in master store you can adjust your chainedFilterFn. For example:

chainedStore = grid.store.makeChained(record => grid.store.indexOf(record) !== -1 && record.city == 'Barcelona');

If record is filtered out from the store indexOf returns -1.

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply