Hi,
I have implemented the vertical mode of the scheduler and encountered an issue when switching between view presets. In my project, I use React, but I have been able to reproduce it using the regular JavaScript version on the bryntum website as well.
My issue is as follows:
- Start the vertical view in anything but a day view (e.g., week, month, etc.).
- Switch to a day view.
- A null pointer will occur (same line of code as: error-bryntumcom-example.png)
When you debug this, you'll notice that the rows will go above the resources "header," and a different calculation to account for this will be triggered. It's this calculation that gives a null pointer exception (see: error-bryntumcom-example.png).
Notes:
- In my React app: The error doesn't occur when you start on a day view but will occur if you switch from this view to another view and then back to a day view.
- In the example: The error doesn't occur every time but comes up only after using it for a while (not sure why precisely).
Error recreation
I have been able to recreate the error by adding the view switching logic from the configuration example to the vertical view example (just to keep it as vanilla as possible).
Another issue you'll notice is that the time axis on the right can get "stuck" when switching presets (see stuck-on-switch-preset.png). Usually this will correct itself after a you switch a few times between different presets.
Hope you can help me out with this one, and thanks!
Regards,
Coen