-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline Editors not working after component destroy in Angular #86
Comments
I've found out that using the gantt.init method on an already initialized gantt instance makes the inline editors unusable. Any workarounds for this? |
@AntoRin, As a workaround, you can detach events and attach them again in the
Here is the snippet: |
Hi, @gearcoded, thanks for the reply. This solution works. Although I was already detaching inline editor events when the component destorys, I wasn't attaching them back during the onGanttReady event. Apparently, that's necessary. And for those who are referring to this later on, you can use the following method to detach all events from the inline editor instead of having to store reference to each event using the returned event ID and detaching them one by one.
|
This snippet no longer works on the current version of DHTMLX Gantt, because the attachEvent function for InlineEditorEvents now returns a boolean rather than a string id. I have not yet been able to find how I can get this id in the current version for detaching purposes. |
Hey, @CedricHg, thanks for the reply. I have been using this solution for a while now following @gearcoded 's advice. Seems to be working fine. Although let me know when this is totally resolved. |
@AntoRin and @CedricHg, that seems to be an issue with the types, though the
And here is the snippet: I will notify you when the issue is fixed. |
@gearcoded, appreciate that. Thank you. |
Dhtmlx-gantt version: 7.1.13
I am using the free version of dhtmlx-gantt. This means that I won't be able to initialize a new gantt instance on component render. I perform some clean-up of the gantt instance on destroy, which is mostly removing all events and tooltips. Although this has been working well so far, the inline editors only work the first time. After the first time, none of the events related to the inline events fire (events that are created using the gantt.ext.inlineEditors.attachEvent method).
The text was updated successfully, but these errors were encountered: