Skip to content

Commit

Permalink
update docs and add proptype validation for hideHeader (#65)
Browse files Browse the repository at this point in the history
update docs and add prop type validation for hideHeader
  • Loading branch information
MichaelRoytman authored Nov 6, 2017
1 parent 6ad42ee commit 31ddbf7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@edx/paragon",
"version": "1.1.2",
"version": "1.1.3",
"description": "Accessible, responsive UI component library based on Bootstrap.",
"main": "src/index.js",
"author": "arizzitano",
Expand Down
1 change: 1 addition & 0 deletions src/Table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Provides a very basic table component with col-scoped headings displayed in the
2. `key` (string; required) maps that label to its corresponding datum for each row in `data`, to ensure table data are displayed in their appropriate columns.
3. `columnSortable` (boolean; optional) specifies at the column-level whether the column is sortable. If `columnSortable` is `true`, a sort button will be rendered in the column table heading. It is only required if `tableSortable` is set to `true`.
4. `onSort` (function; conditionally required) specifies what function is called when a sortable column is clicked. It is only required if the column's `columnSortable` is set to `true`.
5. `hideHeader` (boolean; optional) specifies at the column-level whether the column label is visible. A column that is sortable cannot have its label be hidden.

The order of objects in `columns` specifies the order of the columns in the table.

Expand Down
1 change: 1 addition & 0 deletions src/Table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ Table.propTypes = {
]).isRequired,
columnSortable: isRequiredIf(PropTypes.bool, props => props.tableSortable),
onSort: isRequiredIf(PropTypes.func, props => props.columnSortable),
hideHeader: PropTypes.bool,
})).isRequired,
headingClassName: PropTypes.arrayOf(PropTypes.string),
tableSortable: PropTypes.bool,
Expand Down

0 comments on commit 31ddbf7

Please sign in to comment.