Extending FlexGrid class creates error after update to version 5.20231.904

Posted by: thomas.froescher on 17 October 2023, 6:47 pm EST

  • Posted 17 October 2023, 6:47 pm EST

    Hi,

    after updating version from 5.20231.888 to 5.20231.904 I get an error when creating my custom class which extends FlexGrid.

    Running this sample

    import {FlexGrid} from "@grapecity/wijmo.grid";
    
    document.readyState === 'complete' ? init() : window.addEventListener('load', init);
    export class MyCustomFlexGridSample extends FlexGrid {
        constructor(mySelector) {
            super(mySelector);
        }
    }
    
    function init() {
        const myCssSelector = document.createElement('div')
        const myFlexGrid = new MyCustomFlexGridSample(myCssSelector)
    }

    I get this error

    es2015-esm.js:14 Uncaught ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor
        at new ArrayBase (es2015-esm.js:14:56187)
        at new ObservableArray (es2015-esm.js:14:56637)
        at new RowColCollection (es2015-esm.js:14:45427)
        at new RowCollection (es2015-esm.js:14:49965)
        at es2015-esm.js:14:66455
        at MyCustomFlexGridSample.deferUpdate (es2015-esm.js:14:84526)
        at new FlexGrid (es2015-esm.js:14:66393)
        at new MyCustomFlexGridSample (flexGridExtend.js:6:9)
        at init (flexGridExtend.js:12:24)

    Any ideas what’s going wrong here?

    Thanks

  • Posted 18 October 2023, 2:56 pm EST

    Hi,

    We are not able to replicate the issue on our end. Could you please share a sample replicating the issue? You could also modify the below-shared sample such that it replicates the issue that you are facing on your end.

    Please refer to this sample for reference: https://jscodemine.grapecity.com/share/g0XaXObwVk62B7JvUChP6A

    Regards

    Anirudh

  • Posted 18 October 2023, 10:59 pm EST

    Hi,

    thanks for the sample. I am using Javascript Modules (esm2015) directory in the brower (loaded as module).

    I couldn’t reproduce the error with jscodemine, but I have attached a simple example similar to your sample that shows a flex grid with minor version 888, but throws an error with 900 and 904.

    I am using rollup.js to create esm code.

    Flexgrid-rollup-esm-error.zip

    Regards,

    Thomas

  • Posted 19 October 2023, 5:56 pm EST

    Hi Thomas,

    Thank you for sharing the sample. I am able to replicate the issue on my end and have forwarded the issue to DEV team. I will let you know as soon as I get any updates from the concerned team.

    Thank you for your understanding.

    Regards

    Anirudh

  • Posted 8 November 2023, 5:15 pm EST

    Hi Anirudh,

    any updates on this topic?

    Thank you

    Thomas

  • Posted 9 November 2023, 10:46 pm EST

    Hi Thomas,

    The issue is still with the DEV team and they are investigating the issue. I will let you know as soon as I get any updates from the DEV team. Please note the internal tracking ID of the issue for further communication: WJM-31257.

    Thank you for your patience and understanding.

    Regards

    Anirudh

  • Posted 1 February 2024, 12:51 am EST

    Hi Anirudh,

    are there any news on that? Tried lastest nightly version, but still doesn’t work.

    Thanks

    Thomas

  • Posted 2 February 2024, 12:24 am EST

    Hi Thomas,

    This issue is still with the DEV team. I have asked about the updates on this issue from the DEV team. I will provide you the updates as soon as I get any information from the DEV team.

    Thank you for your patience and understanding.

    Regards

    Anirudh

  • Posted 21 February 2024, 5:41 pm EST

    We’ve recently attempted to configure our Angular build via a custom webpack configuration as per https://developer.mescius.com/wijmo/docs/GettingStarted/NPM-Module-Formats so that we leverage the ES2015 variant of Wijmo.

    We encountered the same issue in the same place (on 5.20232.939):

    object ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor
        at new ArrayBase (es2015-esm.js:14:56318)
        at new ObservableArray (es2015-esm.js:14:56768)
        at new RowColCollection (es2015-esm.js:14:45974)
        at new RowCollection (es2015-esm.js:14:50540)
        at es2015-esm.js:14:67158
       ...
  • Posted 22 February 2024, 7:45 pm EST

    Hi Mark,

    To investigate the issue related to the usage of ES2015 + ESM (es2015-esm.js) wijmo files in Angular build, please provide a small offline sample sharing the custom webpack configuration in the sample along with its usage.

    Also, please share the steps that are needed from my end to replicate the issue.

    Please modify this simple FlexGrid sample such that it uses your custom webpack configuration: Sample.zip

    Thank you.

    Regards

    Anirudh

Need extra support?

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

Learn More

Forum Channels