Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Typescript] The type definitions for properties in CustomGroupingProps interface are wrong #941

Closed
1 task done
franklixuefei opened this issue Apr 16, 2018 · 1 comment · Fixed by #946
Closed
1 task done
Labels
bug Grid The DevExtreme Reactive Grid component

Comments

@franklixuefei
Copy link
Contributor

franklixuefei commented Apr 16, 2018

  • I have searched this repository's issues and believe that this is not a duplicate.

Current Behaviour

The types for grouping and expandedGroups in CustomGroupingProps do not accept null, which does not match with the implementation.

export interface CustomGroupingProps {
  /** A function that extracts groups from the specified data. It is executed recursively for the root and nested groups. */
  getChildGroups: (currentRows: Array<any>, grouping: Grouping, rootRows: Array<any>) => Array<{ key: number | string, value?: any, childRows?: Array<any> }>;
  /** Specifies columns by which data is grouped. */
  grouping?: Array<Grouping>;
  /** Specifies the expanded groups. */
  expandedGroups?: Array<GroupKey>;
}

Expected Behaviour

The types for grouping and expandedGroups in CustomGroupingProps should be able to accept null.

export interface CustomGroupingProps {
  /** A function that extracts groups from the specified data. It is executed recursively for the root and nested groups. */
  getChildGroups: (currentRows: Array<any>, grouping: Grouping, rootRows: Array<any>) => Array<{ key: number | string, value?: any, childRows?: Array<any> }>;
  /** Specifies columns by which data is grouped. */
  grouping?: Array<Grouping> | null;
  /** Specifies the expanded groups. */
  expandedGroups?: Array<GroupKey> | null;
}

Your Environment

devextreme-reactive: 1.2.0-beta1
react: 16.2.0
browser: Chrome/Edge
material-ui: yes

@franklixuefei franklixuefei changed the title [Typescript] The type definition for properties in CustomGroupingProps interface are wrong [Typescript] The type definitions for properties in CustomGroupingProps interface are wrong Apr 17, 2018
@kvet kvet self-assigned this Apr 17, 2018
@kvet kvet added the bug label Apr 17, 2018
@kvet kvet closed this as completed in #946 Apr 18, 2018
@dxrobot dxrobot added the Grid The DevExtreme Reactive Grid component label May 2, 2019
@dxrobot dxrobot unassigned kvet May 2, 2019
@lock
Copy link

lock bot commented Jun 14, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Grid The DevExtreme Reactive Grid component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants