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

feat: add grouped table #408

Merged
merged 4 commits into from Mar 28, 2022
Merged

feat: add grouped table #408

merged 4 commits into from Mar 28, 2022

Conversation

ghost
Copy link

@ghost ghost commented Mar 25, 2022

No description provided.

@@ -414,8 +489,26 @@ export const defaultStory = () => (
</div>
);

defaultStory.story = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this changes please

@@ -315,12 +322,11 @@ class TableBuilder extends PureComponent<TableBulderProps, TableBuilderState> {
);
}

renderBody = () => {
renderBody = (data:any) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
renderBody = (data:any) => {
renderBody = (data:Array<Object>) => {


const groupedData = groupBy(data) || {};
return (
// $FlowFixMe
Copy link
Contributor

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?

/** 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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
renderGroupTitle?: (key:string, data: any) => React$Node,
renderGroupTitle?: (key:string, data: Array<Object>) => React$Node,

@Selnapenek Selnapenek merged commit d3462be into 8base:master Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant