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

refactor(react-grid): replace render functions with components in Grid #486

Merged
merged 8 commits into from Nov 22, 2017
Merged

refactor(react-grid): replace render functions with components in Grid #486

merged 8 commits into from Nov 22, 2017

Conversation

kvet
Copy link
Contributor

@kvet kvet commented Nov 15, 2017

BREAKING CHANGES:
 
The Grid's rootTemplate, headerPlaceholderTemplate, and footerPlaceholderTemplate properties have been replaced with rootComponent, headerPlaceholderComponent, and footerPlaceholderComponent. This also means that they accept components instead of render functions. Find more details here: #496
 
The headerTemplate, bodyTemplate, and footerTemplate properties have been replaced with the children property in rootTemplate.

rootTemplate: PropTypes.func.isRequired,
headerPlaceholderTemplate: PropTypes.func,
footerPlaceholderTemplate: PropTypes.func,
rootComponent: PropTypes.func.isRequired,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is PropTypes.func correct for this property?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. This is the way React components can be validated

@kvet kvet changed the title refactor(react-grid): convert templates to components in Grid [wip]refactor(react-grid): convert templates to components in Grid Nov 16, 2017
@kvet kvet changed the title [wip]refactor(react-grid): convert templates to components in Grid refactor(react-grid): replace render functions with components in Grid Nov 21, 2017
@@ -29,25 +29,23 @@ Field | Type | Description
name | string | Specifies the column name or the name of a row field whose value the column displays. If the column name does not match any field name, specify the `getCellValue` function.
getCellValue | (row: any, columnName: string) => any | Specifies the function used to get the column value for a given row.

### <a name="root-args"></a>RootArgs
### RootProps

Describes properties passed to the root template when it is being rendered.
Copy link
Contributor

Choose a reason for hiding this comment

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

'passed to the root template' -> 'passed to the root component' ? The same is in the HeaderPlaceholderProps, FooterPlaceholderProps

@kvet kvet requested a review from viterobk November 21, 2017 11:11
@kvet kvet merged commit cb409a1 into DevExpress:master Nov 22, 2017
@kvet kvet deleted the grid-tempates-to-components branch November 22, 2017 10:53
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.

None yet

5 participants