-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react-grid): TableView support stub cell rendering if no data fo…
…r cell is provided (#155)
- Loading branch information
Showing
19 changed files
with
452 additions
and
117 deletions.
There are no files selected for viewing
4 changes: 1 addition & 3 deletions
4
packages/dx-react-grid-bootstrap3/src/plugins/table-group-row.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 7 additions & 11 deletions
18
packages/dx-react-grid-bootstrap3/src/templates/table-filter-cell.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/dx-react-grid-bootstrap3/src/templates/table-stub-cell.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
export const TableStubCell = ({ style }) => ( | ||
<td style={style} /> | ||
); | ||
|
||
TableStubCell.propTypes = { | ||
style: PropTypes.shape(), | ||
}; | ||
|
||
TableStubCell.defaultProps = { | ||
style: null, | ||
}; |
14 changes: 14 additions & 0 deletions
14
packages/dx-react-grid-bootstrap3/src/templates/table-stub-header-cell.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
export const TableStubHeaderCell = ({ style }) => ( | ||
<th style={style} /> | ||
); | ||
|
||
TableStubHeaderCell.propTypes = { | ||
style: PropTypes.shape(), | ||
}; | ||
|
||
TableStubHeaderCell.defaultProps = { | ||
style: null, | ||
}; |
4 changes: 1 addition & 3 deletions
4
packages/dx-react-grid-material-ui/src/plugins/table-group-row.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/dx-react-grid-material-ui/src/templates/table-stub-cell.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { TableCell } from 'material-ui'; | ||
import { withStyles, createStyleSheet } from 'material-ui/styles'; | ||
|
||
const styleSheet = createStyleSheet('TableStubCell', () => ({ | ||
cell: { | ||
padding: 0, | ||
}, | ||
})); | ||
|
||
const TableStubCellBase = ({ style, classes }) => ( | ||
<TableCell | ||
style={style} | ||
className={classes.cell} | ||
/> | ||
); | ||
|
||
TableStubCellBase.propTypes = { | ||
style: PropTypes.object, | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
TableStubCellBase.defaultProps = { | ||
style: {}, | ||
}; | ||
|
||
export const TableStubCell = withStyles(styleSheet)(TableStubCellBase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.