-
Notifications
You must be signed in to change notification settings - Fork 380
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
Conversation
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. |
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.
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. |
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.
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 |
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.
Is the Table
prefix required?
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.
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.
BREAKING CHANGES:
The TableRowDetail plugin's
detailToggleCellWidth
property has been renamed totoggleColumnWidth
. Thetemplate
,detailCellTemplate
,detailRowTemplate
, anddetailToggleCellTemplate
properties have been replaced withcontentComponent
,cellComponent
,rowComponent
, andtoggleCellComponent
ones, which accept components instead of render functions. Find more details here: #496Properties passed to
cellComponent
have the same names as arguments passed to thedetailCellTemplate
function except for thechildren
property, which is used instead of thetemplate
argument.Properties passed to
toggleCellComponent
have the same names as arguments passed to thedetailToggleCellTemplate
function except for theonToggle
property, which is used instead of thetoggleExpanded
argument.