File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ demo: https://flyingpath.github.io/react-virtualize-search-table
1111| title | element or string | | table title |
1212| columns | array | Y | Array of data object with dataKey and label [ Example] ( #Columns ) |
1313| data | array | Y | Array of data object with element, searchKey and orderKey. [ Example] ( #dataExample )
14+ | rowHeight | number | N | Height of row, default: 60
15+
1416
1517### <a name =" Columns " ></a >columns
1618
Original file line number Diff line number Diff line change @@ -207,8 +207,10 @@ class ReactVirtualizedSearchTable extends React.Component {
207207 }
208208 } )
209209
210+ const minWidth = columns . length * 80
211+
210212 return (
211- < div className = { style . main } >
213+ < div className = { style . main } style = { { minWidth : minWidth } } >
212214 < AutoSizer className = { style . autoSizer } style = { { height : '100%' , width : '100%' } } >
213215 { ( { height, width } ) => {
214216 return (
@@ -222,7 +224,7 @@ class ReactVirtualizedSearchTable extends React.Component {
222224 width = { width - 2 }
223225 height = { height - 100 }
224226 headerHeight = { 70 }
225- rowHeight = { 40 }
227+ rowHeight = { this . props . rowHeight || 60 }
226228 rowCount = { filterdData . length }
227229 rowRenderer = { this . rowRenderer }
228230 rowGetter = { ( { index } ) => filterdData [ index ] }
@@ -280,6 +282,7 @@ ReactVirtualizedSearchTable.propTypes = {
280282 } )
281283 )
282284 ) . isRequired ,
285+ rowHeight : PropTypes . number
283286}
284287
285288export default ReactVirtualizedSearchTable
Original file line number Diff line number Diff line change 11.main {
2- min-width : 700px ;
32 height : 100% ;
43}
54
You can’t perform that action at this time.
0 commit comments