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:
Horiuchi_H
2015-12-22 19:32:42 +09:00
2 changed files with 16 additions and 22 deletions
+14 -20
View File
@@ -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
View File
@@ -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;
}
}