Merge pull request #10301 from ianks/react-bootstrap-table-editable

react-bootstrap-table: add cols and rows options to Editable
This commit is contained in:
Yui
2016-07-26 17:47:15 -07:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
@@ -23,7 +23,7 @@ function priceFormatter(cell: any, row: any) {
render(
<BootstrapTable data={products} striped={true} hover={true}>
<TableHeaderColumn dataField="id" isKey={true} dataAlign="center" dataSort={true}>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField="name" dataSort={true}>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField="name" dataSort={true} editable={{ type: 'textarea', rows: 10 }}>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField="price" dataFormat={priceFormatter}>Product Price</TableHeaderColumn>
</BootstrapTable>,
document.getElementById("app")
+7 -1
View File
@@ -1,6 +1,6 @@
// Type definitions for react-bootstrap-table v2.3.0
// Project: https://github.com/AllenFang/react-bootstrap-table
// Definitions by: Frank Laub <https://github.com/flaub>, Michael Scharf <https://github.com/scharf>
// Definitions by: Frank Laub <https://github.com/flaub>, Michael Scharf <https://github.com/scharf>, Ian Ker-Seymer <https://github.com/ianks>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../react/react.d.ts" />
@@ -556,6 +556,12 @@ declare module "react-bootstrap-table" {
*/
options?: any;
/**
Configuration for the textarea editable type
*/
cols?: number;
rows?: number;
}
export type FilterType = 'TextFilter' | 'RegexFilter' | 'SelectFilter' | 'NumberFilter' | 'DateFilter' | 'CustomFilter';