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 TableRowDetail #505

Merged
merged 11 commits into from
Dec 4, 2017
Merged

refactor(react-grid): replace render functions with components in TableRowDetail #505

merged 11 commits into from
Dec 4, 2017

Conversation

kvet
Copy link
Contributor

@kvet kvet commented Nov 24, 2017

BREAKING CHANGES:

The TableRowDetail plugin's detailToggleCellWidth property has been renamed to toggleColumnWidth. The template, detailCellTemplate, detailRowTemplate, and detailToggleCellTemplate properties have been replaced with contentComponent, cellComponent, rowComponent, and toggleCellComponent ones, which accept components instead of render functions. Find more details here: #496

Properties passed to cellComponent have the same names as arguments passed to the detailCellTemplate function except for the children property, which is used instead of the template argument.

Properties passed to toggleCellComponent have the same names as arguments passed to the detailToggleCellTemplate function except for the onToggle property, which is used instead of the toggleExpanded argument.

@kvet kvet changed the title [wip]refactor(react-grid): replace render functions with components in TableRowDetail refactor(react-grid): replace render functions with components in TableRowDetail Nov 27, 2017
@kvet kvet requested a review from viterobk November 27, 2017 09:41
contentComponent | ElementType<[DetailContentProps](#detailcontentprops)> | | A component that renders row details.
cellComponent | ElementType<[TableDetailCellProps](#tabledetailcellprops)> | | A component that renders a detail cell.
rowComponent | ElementType<[TableDetailRowProps](#tabledetailrowprops)> | | A component that renders a detail row.
toggleCellComponent | ElementType<[TableDetailToggleCellProps](#tabledetailtogglecellprops)> | | A component that renders the detail toggle control.
Copy link
Contributor

Choose a reason for hiding this comment

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

toggleCellComponent - A component that renders the detail toggle control.
It isn't clear what this component renders cell or toggle control.

cellComponent | ElementType<[TableDetailCellProps](#tabledetailcellprops)> | | A component that renders a detail cell.
rowComponent | ElementType<[TableDetailRowProps](#tabledetailrowprops)> | | A component that renders a detail row.
toggleCellComponent | ElementType<[TableDetailToggleCellProps](#tabledetailtogglecellprops)> | | A component that renders the detail toggle control.
toggleColumnWidth | number | | Specifies the detail toggle cell width.
Copy link
Contributor

Choose a reason for hiding this comment

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

toggleColumnWidth -> Specifies the detail toggle cell width.


A value with the [TableRowProps](table.md#tablerowprops) shape extended by the following fields:

Field | Type | Description
------|------|------------
row | any | A row.

### <a name="detail-toggle-args"></a>DetailToggleArgs
### TableDetailToggleCellProps
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the Table prefix required?

Copy link
Contributor Author

@kvet kvet Nov 29, 2017

Choose a reason for hiding this comment

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

It is not required. But I don't think that the name is important enough to change it. We will review them with TypeScript/FlowType definitions adding.

@kvet kvet merged commit 844330b into DevExpress:master Dec 4, 2017
@kvet kvet deleted the tablerowdetail-components branch December 4, 2017 13:46
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.

5 participants