-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: add grouped table #408
Conversation
@@ -414,8 +489,26 @@ export const defaultStory = () => ( | |||
</div> | |||
); | |||
|
|||
defaultStory.story = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this changes please
src/components/Table/TableBuilder.js
Outdated
@@ -315,12 +322,11 @@ class TableBuilder extends PureComponent<TableBulderProps, TableBuilderState> { | |||
); | |||
} | |||
|
|||
renderBody = () => { | |||
renderBody = (data:any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renderBody = (data:any) => { | |
renderBody = (data:Array<Object>) => { |
src/components/Table/TableBuilder.js
Outdated
|
||
const groupedData = groupBy(data) || {}; | ||
return ( | ||
// $FlowFixMe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what kind of error/warning here?
src/components/Table/TableBuilder.js
Outdated
/** Callback to group data by field*/ | ||
groupBy: <T: $Shape<any>>(data: T[]) => { [key: string]: T[]}, | ||
/** Callback to render grouped table title */ | ||
renderGroupTitle?: (key:string, data: any) => React$Node, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renderGroupTitle?: (key:string, data: any) => React$Node, | |
renderGroupTitle?: (key:string, data: Array<Object>) => React$Node, |
No description provided.