Our state of the art Gantt chart


Post by tikhonov.a.p »

This "const responseString = this.project.decode()" returned NULL


Post by alex.l »

Sorry for that, I gave you wrong code.
Of course, we need to pass responseText as a param of decode method.

Btw, I found that we didn't pass responseText into fail handlers, so you'll need to override 2 methods for our workaround. Here is an example:

const gantt = new Gantt({
    appendTo : 'container',
    
[...] onCrudManagerRequestFail({ requestType, response, responseText }) { // response will be NULL here, so we will need to decode responseText again this.onCrudManagerRequestFinalize(false, requestType, responseText); }, onCrudManagerRequestFinalize(successful, requestType, responseText){ const response = this.project.decode(responseText); const me = this; if (successful) { me.masked = null; me.toggleEmptyText?.(); } else { // Do not remove. Assertion strings for Localization sanity check. // 'L{GridBase.loadFailedMessage}' // 'L{GridBase.syncFailedMessage}' me.applyMaskError(`<div>SOMETHING</div>`); } },

All the best,
Alex


Post Reply