Premium support for our pure JavaScript UI components


Post by marasoft@netrom.ro »

Hello,

On some specific action I need to filter the resources from the scheduler and for that I have something like this:

 this.scheduler.current.instance.resourceStore.filter(resource =>
              !this.resourcesToRemove.some(t => t.id === resource.id));

After that I have to clear the filter just for some resources, for ex:

 this.scheduler.current.instance.resourceStore.clearFilters(r => r.id === 'some number');

However this does not work because there is no clearFilters method which takes any params.

How can I clear the filters just for some specific data?

Best regards,


Post by mats »

Just remove the existing filter and apply a new one that matches your requirements?

https://bryntum.com/docs/scheduler/api/Core/data/mixin/StoreFilter#function-removeFilter


Post Reply