bug with react-kendo-grid-wrapper(GridColumn)

10 posts, 0 answers
  1. Artur
    Artur avatar
    8 posts
    Member since:
    Feb 2018

    Posted 29 Mar 2018 Link to this post

    GridColumn didn't work correctly. I can't use them when I insert it inside Grid.

    I see that GridColumn is function

    var GridColumn = function (props) { return null; };
    GridColumn.displayName = 'GridColumn';

    In Grid component you try to compare child component with this 'component'

    var columns = React.Children
               .toArray(children)
               .filter(function (child) { return child && child.type === GridColumn_1.default; })
               .map(function (child) { return Object.assign({}, child.props); });

    So, after filter there zero items, because we try to compare 2 functions.

    Could you fix it, please? 

  2. Stefan
    Admin
    Stefan avatar
    2826 posts

    Posted 30 Mar 2018 Link to this post

    Hello, Artur,

    Thank you for the information.

    Could you please share in which scenario the GridColumn is not working is possible with an example. On our end the GridColumn components are working as expected:

    https://www.telerik.com/kendo-react-ui/wrappers/grid/#toc

    The GridColumn component is a stateless function:

    import * as React from 'react';
    import * as ReactDOM from 'react-dom';
     
    export interface GridColumnProps extends kendo.ui.GridColumn { }
     
    let GridColumn: React.StatelessComponent<GridColumnProps> = (props: GridColumnProps): JSX.Element | null => null;
     
    GridColumn.displayName = 'GridColumn';
     
    export default GridColumn;

    I will be expecting an example and we will gladly investigate it further.

    Thank you in advance for the cooperation.

    Regards,
    Stefan
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Artur
    Artur avatar
    8 posts
    Member since:
    Feb 2018

    Posted 30 Mar 2018 in reply to Stefan Link to this post

    Example from https://www.telerik.com/kendo-react-ui/wrappers/grid/#toc .

    Yes, you are right about StatelessComponent. I have declaration file where GridColumn is declared as StatelessComponent.

    P.s. I use typescript

  4. Artur
    Artur avatar
    8 posts
    Member since:
    Feb 2018

    Posted 30 Mar 2018 in reply to Stefan Link to this post

    If I remove the filter it will work fine. But filter don't work correctly and I don't know why...

  5. Stefan
    Admin
    Stefan avatar
    2826 posts

    Posted 02 Apr 2018 Link to this post

    Hello, Artur,

    Thank you for the details.

    Based on the code I can assume that you are importing the GridColumn from the Kendo UI for React wrappers and using it inside the native Kendo UI Grid for React or the other way around.

    Please ensure that both Grids are not mixed up:

    Wrapper:

    https://www.telerik.com/kendo-react-ui/wrappers/grid/#toc-grid-overview

    Native Grid:

    http://https//www.telerik.com/kendo-react-ui/components/grid/

    If the issue still occurs, please provide an example, as the mentioned issue is not reproducible on our end and we would like to inspect the implementation.

    Regards,
    Stefan
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Artur
    Artur avatar
    8 posts
    Member since:
    Feb 2018

    Posted 02 Apr 2018 in reply to Stefan Link to this post

    I use just wrappers, because I can't use native components for now
  7. Stefan
    Admin
    Stefan avatar
    2826 posts

    Posted 02 Apr 2018 Link to this post

    Hello, Artur,

    Thank you for the clarification.

    Could you please elaborate on the scenario in which this does not work correctly. We made different testing scenarios and in all of them, this was working.

    We will be happy to provide a fix, but we need to be able to replicate the issue in order to fix it.

    Please share with us an example where the issue is reproducible and the developers' team will take a look at it as soon as possible.

    Regards,
    Stefan
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Artur
    Artur avatar
    8 posts
    Member since:
    Feb 2018

    Posted 02 Apr 2018 in reply to Stefan Link to this post

    For now I have 2 files(js + declaration) for GridColumn(attached).

    This code from GridColumn.d.ts:

    import * as React from 'react';
    export interface GridColumnProps extends kendo.ui.GridColumn {
    }
    declare let GridColumn: React.StatelessComponent<GridColumnProps>;
    export default GridColumn;

     

    This code from GridColumn.js:

    var GridColumn = function (props) { return null; };
    GridColumn.displayName = 'GridColumn';
    export default GridColumn;
    //# sourceMappingURL=GridColumn.js.map

     

    It it OK?

     

    P.s. I looked at your example and found just 1 file *.tsx

     

     

  9. Artur
    Artur avatar
    8 posts
    Member since:
    Feb 2018

    Posted 02 Apr 2018 in reply to Stefan Link to this post

    packages tree
  10. Stefan
    Admin
    Stefan avatar
    2826 posts

    Posted 03 Apr 2018 Link to this post

    Hello, Artur,

    Thank you for the code.

    This is the correct one.

    Still, please share with us the scenario in which the issue is observed.

    I'm may be missing something and please excuse me for it, as for now, I did not notice the case in which the GridColumn is causing issues.

    Regards,
    Stefan
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top