mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-29 11:12:23 +08:00
Merge pull request #7265 from zerovox/master
Fix fixed-data-table typings, Column extends from React.Props so you can supply a key
This commit is contained in:
@@ -143,26 +143,20 @@ class MyTable4 extends React.Component<{}, MyTable4State> {
|
||||
headerHeight={50}
|
||||
width={1000}
|
||||
height={500}>
|
||||
<Column
|
||||
header={<Cell>Name</Cell>}
|
||||
cell={
|
||||
<MyTextCell
|
||||
data={this.state.tableData}
|
||||
field="name"
|
||||
/>
|
||||
}
|
||||
width={200}/>
|
||||
|
||||
<Column
|
||||
header={<Cell>Email</Cell>}
|
||||
cell={
|
||||
<MyLinkCell
|
||||
data={this.state.tableData}
|
||||
field="email"
|
||||
/>
|
||||
}
|
||||
width={200}
|
||||
/>
|
||||
{
|
||||
["name", "email"].map(field =>
|
||||
<Column
|
||||
key={field}
|
||||
header={<Cell>{field}</Cell>}
|
||||
cell={
|
||||
<MyTextCell
|
||||
data={this.state.tableData}
|
||||
field={field}
|
||||
/>
|
||||
}
|
||||
width={200}/>
|
||||
)
|
||||
}
|
||||
</Table>
|
||||
);
|
||||
}
|
||||
|
||||
+2
-2
@@ -249,7 +249,7 @@ declare module FixedDataTable {
|
||||
/**
|
||||
* Component that defines the attributes of table column.
|
||||
*/
|
||||
interface ColumnProps {
|
||||
interface ColumnProps extends __React.Props<Column> {
|
||||
/**
|
||||
* The horizontal alignment of the table cell content.
|
||||
*
|
||||
@@ -498,4 +498,4 @@ declare module FixedDataTable {
|
||||
|
||||
declare module "fixed-data-table" {
|
||||
export = FixedDataTable;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user