My Schedule component has 5 levels of resources available:
BASIN > GEOUNIT > SUBGEOUNIT > FACILITY > BUSINESS
Events can be bound to either the FACILITY resource or the BUSINESS resource.
I have an event handler for popupOpen wherein I cancel the default event and do something else. Depending on the type of event the user is attempting to edit, I either dispatch an event to Redux or I open a new browser tab. My event handler is shown here:
My users are experiencing an issue the FIRST TIME they click the Edit button (or double click an item). An error is thrown inside a javascript file name "event-window.js" on line 531 inside the function "EventWindow.prototype.onDropdownResourceChange". This is preventing the popupOpen handler from firing. Here is a screenshot of the location in the scheduler code where the crash happens:
I have underlined the line of code that throws the error.
Firstly: Why is onDropdownResourceChange firing? I am canceling the Editor popup from being opened but it appears it must still be instantiating the default editor popup if it is running this function.
As I step through the iterations of the loop in this function, it succeeds for my BASIN item, then the GEOUNIT, then the SUBGEOUNIT, but then CRASHES for my FACILITY item.
This is what my layout looks like.
That function succeeded for "AML", "CAL", and "CAN", but crashed for the item "10640 - Calgary WEC ...".
Now, as I said before, this error only happens the FIRST time the user clicks on the QuickInfo edit button or double clicks an item. The next time they try it does NOT run the onDropdownResourceChange code and it calls my popupOpen event handler successfully.
How I can prevent this from happening?
Hi Justin,
Greetings from Syncfusion Support.
We have checked on your reported issue and require additional details to further proceed on your requirement. So could you please get back to us with the below details that help us to check with your requirement and provide the solution earlier?
Regards,
Vinitha
Hi Vinitha.
Thanks for answering the question.
I've attached a simple code that will help you understand. This is the complete code we used. I put some new objects just to reproduce the db.
The scheduler version is:
The error message is:
This only happens on the first double click.
I am not able to create another app just to try to reproduce this error by today. I am working on that. I hope those informations above can help you to understand the problem.
Thanks a lot.
Hi Justin,
Thanks for your update.
We checked your shared information and suspect that before the resource dataSource changes are reflected in the scheduler, you tried to open the event window that caused the reported issue.
So, please share the replication sample, and we will investigate the problem and get back to you as soon as possible.
Regards,
Vinitha