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 TableView #485

Merged
merged 21 commits into from Nov 28, 2017
Merged

refactor(react-grid): replace render functions with components in TableView #485

merged 21 commits into from Nov 28, 2017

Conversation

kvet
Copy link
Contributor

@kvet kvet commented Nov 15, 2017

BREAKING CHANGES:

The TableView's tableLayoutTemplate, tableCellTemplate, tableRowTemplate, tableNoDataCellTemplate, tableNoDataRowTemplate, tableStubCellTemplate, and tableStubHeaderCellComponent properties have been replaced with layoutComponent, getCellComponent, rowComponent, noDataCellComponent, noDataRowComponent, stubCellComponent and stubHeaderCellComponent. This also means that they accept components instead of render functions. Find more details here: #496

@kvet kvet changed the title [wip]refactor(react-grid): convert templates to components [wip]refactor(react-grid): convert templates to components in TableView Nov 15, 2017
@kvet kvet changed the title [wip]refactor(react-grid): convert templates to components in TableView [wip]refactor(react-grid): replace render functions with components in TableView Nov 21, 2017
@kvet kvet changed the title [wip]refactor(react-grid): replace render functions with components in TableView refactor(react-grid): replace render functions with components in TableView Nov 23, 2017
@@ -21,25 +21,25 @@ describe('TableLayout', () => {
jest.resetAllMocks();
});

it('should pass rowTemplate to TableLayoutCore', () => {
it('should pass rowComponent to TableLayoutCore', () => {
const rowTemplateMock = jest.fn();
const rowTemplateArgs = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Inconsistent names. It seems like they should contain *Component.


A value with the following shape:

Field | Type | Description
------|------|------------
key | string | A table column's unique identifier.
type | string | Specifies the table column type. The specified value defines which cell template is used to render the column.
column? | [Column](#column) | Specifies the associated user column.
column? | [Column](#column-extension) | Specifies the associated user column.
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like you removed all '-' symbols from link anchors, but not here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a way markdown generate default header ids.

const bodyTemplate = props => <tbody {...props} />;
const HeadTable = props => <Table use="head" {...props} />;
const TableHead = props => <thead {...props} />;
const TableBody = props => <thead {...props} />;
Copy link
Contributor

Choose a reason for hiding this comment

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

<thead {...props} /> -> <tbody {...props} /> ?

@kvet kvet requested a review from viterobk November 23, 2017 09:21
@kvet kvet merged commit f5bd4e0 into DevExpress:master Nov 28, 2017
@kvet kvet deleted the tableview-templates-to-components branch November 28, 2017 13:41
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