[FlexGrid] Some TS definitions are missing since version 5.20193.637

Posted by: james.ingham on 25 November 2019, 11:45 pm EST

    • Post Options:
    • Link

    Posted 25 November 2019, 11:45 pm EST

    Dear Support,

    Today I tried the new wijmo release 5.20193.637 in our angular2 project. All of sudden I came across below errors:

    
    error TS2339: Property 'propertyName' does not exist on type 'GroupDescription'.
    ...
    Argument of type 'Column[]' is not assignable to parameter of type 'Column'.
      Property '_hdr' is missing in type 'Column[]'.
    ...
    Property 'isCollapsed' does not exist on type 'Row'.
    ...
    
    

    The error regarding ‘Column’ is from ```

    flexInline.columns.remove(columns);

    
    However they all look like missing TS definitions. All these properties still exist and they still seem to function. Because I didn't see them mentioned in your release notes: https://www.grapecity.com/blogs/wijmo-release-2019-v3, may I ask if they are expected changes?
  • Posted 26 November 2019, 2:37 am EST

    Hi James,

    Yes, there are some typing changes done in the 19v3 version. You can read more about it from the link below:

    https://www.grapecity.com/blogs/wijmo-v3-improved-typing-support

    Regarding ‘propertyName’ and ‘isCollapsed’ errors:

    These are expected behaviors because the groupDescriptions property takes an object of GroupDescription and also returns it. But ‘propertyName’ does not exist in GroupDescription class. To solve this, you may cast the object to PropertyGroupDescription:

    var name = (collectionView.groupDescriptions[0] as PropertyGroupDescrption).propertyName;
    

    Similarly, the flexgrid.rows property is an array of Row class and the Row class does not contain a property named ‘isCollapsed’ but GroupRow does. You can apply cast again to solve the issue:

    var isCollapsed = (flexgrid.rows[0] as GroupRow).isCollapsed;
    

    Regarding columns:

    We provided an array of columns to the remove method but it does not seem to work in both the latest and the earlier versions. If it worked on your end, could you provide a small sample replicating the behavior?

    Regards,

    Ashwin

  • Posted 26 November 2019, 10:56 pm EST

    Thanks for your prompt reply. It’s good to know that ‘propertyName’ and ‘isCollapsed’ is still functioning and you are not going to retire them.

    Regarding the columns.remove() function, I did a double check in our previous code and you were correct, it returns false and does not do anything if you pass an array of columns as the argument.

    So far so good. Thanks for your help!

  • Posted 26 November 2019, 11:07 pm EST

    We are glad to be able to help you. Let us know if you have any additional queries.

    ~regards

Need extra support?

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

Learn More

Forum Channels