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
refactor(react-grid): replace render functions with components in TableView #485
Conversation
@@ -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 = { |
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.
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. |
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 looks like you removed all '-' symbols from link anchors, but not here.
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'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} />; |
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.
<thead {...props} />
-> <tbody {...props} />
?
…ctive into tableview-templates-to-components
BREAKING CHANGES:
The TableView's
tableLayoutTemplate
,tableCellTemplate
,tableRowTemplate
,tableNoDataCellTemplate
,tableNoDataRowTemplate
,tableStubCellTemplate
, andtableStubHeaderCellComponent
properties have been replaced withlayoutComponent
,getCellComponent
,rowComponent
,noDataCellComponent
,noDataRowComponent
,stubCellComponent
andstubHeaderCellComponent
. This also means that they accept components instead of render functions. Find more details here: #496