PreadJS Designer destroy error

Posted by: khachanthanh on 14 November 2022, 9:58 pm EST

    • Post Options:
    • Link

    Posted 14 November 2022, 9:58 pm EST - Updated 15 November 2022, 3:14 pm EST

    SpreadJS version 15.2.4

    When i try destroy designer, i caught an error: TypeError: e.unbind is not a function

      componentWillUnmount () {
        if (this.designer) {
          _.isFunction(this.designer.destroy) && this.designer.destroy()

    Stack trace

    gc.spread.sheets.designer.all.min.js?fc0a:1 Uncaught TypeError: e.unbind is not a function

    at Object.C [as internalUnbind] (gc.spread.sheets.designer.all.min.js?fc0a:1:996921)

    at e.destroy (gc.spread.sheets.designer.all.min.js?fc0a:1:6093563)

    at r.value (gc.spread.sheets.designer.react.min.js?cf67:1:2638)

    at callComponentWillUnmountWithTimer (react-dom.development.js?61bb:20413:1)

    at HTMLUnknownElement.callCallback (react-dom.development.js?61bb:3945:1)

    at Object.invokeGuardedCallbackDev (react-dom.development.js?61bb:3994:1)

    at invokeGuardedCallback (react-dom.development.js?61bb:4056:1)

    at safelyCallComponentWillUnmount (react-dom.development.js?61bb:20420:1)

    at commitUnmount (react-dom.development.js?61bb:20951:1)

    at commitNestedUnmounts (react-dom.development.js?61bb:21004:1)

    C @ gc.spread.sheets.designer.all.min.js?fc0a:1

    e.destroy @ gc.spread.sheets.designer.all.min.js?fc0a:1

    value @ gc.spread.sheets.designer.react.min.js?cf67:1

    callComponentWillUnmountWithTimer @ react-dom.development.js?61bb:20413

    callCallback @ react-dom.development.js?61bb:3945

    invokeGuardedCallbackDev @ react-dom.development.js?61bb:3994

    invokeGuardedCallback @ react-dom.development.js?61bb:4056

    safelyCallComponentWillUnmount @ react-dom.development.js?61bb:20420

    commitUnmount @ react-dom.development.js?61bb:20951

    commitNestedUnmounts @ react-dom.development.js?61bb:21004

    Have not error in version 14, I have updated to version 15 and occur eror, please help me. Thanks you

  • Posted 16 November 2022, 6:40 am EST


    SpreadJS Designer has a known limitation in this regard. The designer is a highly complex DOM component, and the entire DOM layout process was designed to be async.The async generator kept the async process running internally.

    The designer layout process was not completed when you called the destroy method in the componentWillUnmount, but the DOM had already been destroyed, resulting in the error.

    The developers suggested dropping the designer react wrapper and instead initializing/destroying the designer yourself.

    You can refer to the attached sample to see how you can handle initialization and destruction on your own.



  • Posted 17 November 2022, 3:10 pm EST

    Thanks you, ankit.kumar

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels