Skip to content

Commit 5516f60

Browse files
committed
Fix grid height settings. Default height 500px.
1 parent 8281e32 commit 5516f60

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "functional-data-grid",
3-
"version": "1.2.18",
3+
"version": "1.2.19",
44
"description": "Functional Data Grid",
55
"main": "dist/FunctionalDataGrid.cjs.js",
66
"module": "dist/FunctionalDataGrid.esm.js",

src/FunctionalDataGrid.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ type FunctionalDataGridProps<T, A> = {
3838
overscanRowCount: number,
3939
sortableColumns: boolean,
4040
enableColumnsSorting: boolean,
41-
enableColumnsShowAndHide: boolean
41+
enableColumnsShowAndHide: boolean,
42+
height: string
4243
}
4344
type FunctionalDataGridState<T> = {
4445
cachedElements : List<DataRow<T>>,
@@ -74,7 +75,8 @@ export default class FunctionalDataGrid<T, A: void> extends React.PureComponent<
7475
onColumnResize: (e: Object) => {},
7576
onColumnsOrderChange: (e: Object) => {},
7677
onColumnVisibilityChange: (e: Object) => {},
77-
onRowClick: (e: Object) => {}
78+
onRowClick: (e: Object) => {},
79+
height: '500px'
7880
}
7981

8082
constructor(props : FunctionalDataGridProps<T, A>) {
@@ -134,6 +136,7 @@ export default class FunctionalDataGrid<T, A: void> extends React.PureComponent<
134136
onColumnsOrderChange={this.onColumnsOrderChange}
135137
onColumnVisibilityChange={this.updateColumnVisibility}
136138
onRowClick={this.props.onRowClick}
139+
height={this.props.height}
137140
/>
138141

139142
getOrderedColumns = () => this.state.columnsOrder.map(columnId => this.getColumns().find(c => c.id === columnId))

src/PresentationalFunctionalDataGrid.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ export default class PresentationalFunctionalDataGrid<T, A: void> extends React.
9292
onColumnResize: (e: Object) => {},
9393
onColumnsOrderChange: (e: Object) => {},
9494
onColumnVisibilityChange: (e: Object) => {},
95-
onRowClick: (e: Object) => {},
96-
height: '100%'
95+
onRowClick: (e: Object) => {}
9796
}
9897

9998
constructor(props : PresentationalFunctionalDataGridProps<T, A>) {

0 commit comments

Comments
 (0)