Our pure JavaScript Scheduler component


Post by armandcolenati »

Hello!

We got a scheduler with 12 resources and more than 800 events and we came across this problem while trying to add filtering. Looks like while filtering the resourceStore, the events which correspond to resources which are filtered out are removed entirely from the DOM. That means that whenever we clear the array of filters, all resources and events are going to be rendered again. This leads to performance issues.

For filtering:
scheduler.resourceStore.filter((resource) => {
	return filters.some((filter) => resource.name.indexOf(filter) >= 0);
});
For removing the filters:
scheduler.resourceStore.clearFilters();
You can also check this using the filtering live example: https://www.bryntum.com/examples/scheduler/filtering/
Filter the staff in order to get only one employee, then inspect the DOM and you're going to find only the event of that employee.
When you clear the filter, you'll observe that the rest of the events of the employees which previously have been filtered out are going to be added to the DOM.

I am not sure if this works as intended or if it is a bug, but we would like to have to possibility to just hide the resources which do not match the filter criteria and the events associated to them.

Post by mats »

How can we see your performance issue? Could you upload your dataset so we can inspect?

Post by armandcolenati »

Unfortunately, I don't think I'm allowed to share the dataset. The performance issue most likely comes from the fact that the events are not being hidden, but actually removed from the DOM, then readded after the filters have been removed. You can actually see the DOM changes in the filtering demo mentioned earlier.

Post by mats »

Ok, you could just replace any texts in your data with XXXX and then upload it perhaps?

Post Reply