Our pure JavaScript Scheduler component


Post by FritsBakker »

Hey,

We are working with Bryntum Scheduler Pro library for a planning component. This component is created with multiple features from different examples, but also some custom angular code.

Screenshot 2021-04-01 at 17.04.30.png
Screenshot 2021-04-01 at 17.04.30.png (189.45 KiB) Viewed 503 times

Currently we have an issue when we have the "asset filter" enable and switch the day view. We are trying to reload the events in the left tree by reloading the resourceStore.data when we switch views.

In our angular component we reload the left tree data by giving new data to the resourceStore.

this.scheduler.schedulerInstance.crudManager.resourceStore.data = this.siteSetupResources;

When the filter is enabled while we switching views we get the following error:

core.js:4127 ERROR TypeError: Cannot read property 'id' of undefined
    at Collection.splice (schedulerpro.module.min.js:18)
    at ResourceStore.onNodeRemoveChild (schedulerpro.module.min.js:18)
    at schedulerpro.module.min.js:18
    at Array.forEach (<anonymous>)
    at r.clearChildren (schedulerpro.module.min.js:18)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:192)

Could you maybe explain why we get this error and how we could properly fix this?
It works without errors when we don't use any filter input while switching.

Kind Regards,
Frits Bakker

Attachments
Screenshot 2021-04-01 at 16.37.57.png
Screenshot 2021-04-01 at 16.37.57.png (77.09 KiB) Viewed 503 times

Post by pmiklashevich »

What Scheduler Pro version is it? Try 4.1.0-beta-3 or nightlies?
Also ProjectModel should be used as a centralized data storage when using Pro version. It extends the CrudManager functionality: https://www.bryntum.com/docs/scheduler-pro/#guides/schedulerpro/project_data.md

If the issue is still reproducible please attach a runnable testcase that we can check. More details here: viewtopic.php?f=35&t=772

Pavlo Miklashevych
Sr. Frontend Developer


Post by FritsBakker »

Alright we will check if something changes with the version you mentioned.

If it doesn't work would it be possible to maybe have a screen share meeting with some from bryntum and a developer from our side? Setting up a project with runnable test cases would take some time for us. Since we won't be able to share our current project and we would need to create a test project.


Post by pmiklashevich »

We've checked the steps you described against 4.1.0 version and found this error: https://github.com/bryntum/support/issues/2605

The stacktrace is different, so you probably have a different problem. Screensharing is not included to the forum support. This can be done as a paid service: https://www.bryntum.com/services/ Please submit a runnable testcase based on one of our demos and we will investigate your problem. Please write here what product version you're using now. If it's not the latest one, there is a chance your problem has been fixed. Basically we should see the same error log, to be sure the issues is gone when the ticket is fixed.

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply