diff --git a/packages/terra-data-grid/CHANGELOG.md b/packages/terra-data-grid/CHANGELOG.md
index de67930acef..57ac38c71f7 100644
--- a/packages/terra-data-grid/CHANGELOG.md
+++ b/packages/terra-data-grid/CHANGELOG.md
@@ -4,6 +4,9 @@
* Fixed
* Fixed issue where focus was given to the column header instead of its button element.
+
+* Added
+ * Added `hasVisibleColumnHeaders` prop for FlowsheetDataGrid to toggle visibility of column headers.
## 1.1.0 - (November 9, 2023)
diff --git a/packages/terra-data-grid/src/DataGrid.jsx b/packages/terra-data-grid/src/DataGrid.jsx
index f24bb177157..870db15a83e 100644
--- a/packages/terra-data-grid/src/DataGrid.jsx
+++ b/packages/terra-data-grid/src/DataGrid.jsx
@@ -126,6 +126,11 @@ const propTypes = {
* rendered to allow for row selection to occur.
*/
hasSelectableRows: PropTypes.bool,
+
+ /**
+ * Boolean indicating whether or not the DataGrid should hide the column headers.
+ */
+ hasVisibleColumnHeaders: PropTypes.bool,
};
const defaultProps = {
@@ -136,29 +141,31 @@ const defaultProps = {
pinnedColumns: [],
overflowColumns: [],
rows: [],
+ hasVisibleColumnHeaders: true,
};
const DataGrid = injectIntl((props) => {
const {
- id,
- ariaLabelledBy,
ariaLabel,
- rows,
- pinnedColumns,
- overflowColumns,
- onColumnResize,
- defaultColumnWidth,
+ ariaLabelledBy,
columnHeaderHeight,
columnResizeIncrement,
- rowHeight,
- onColumnSelect,
+ defaultColumnWidth,
+ hasVisibleColumnHeaders,
+ hasSelectableRows,
+ id,
+ onCellRangeSelect,
onCellSelect,
onClearSelection,
+ onColumnResize,
+ onColumnSelect,
onRangeSelection,
onRowSelectionHeaderSelect,
- onCellRangeSelect,
- hasSelectableRows,
+ overflowColumns,
+ pinnedColumns,
rowHeaderIndex,
+ rowHeight,
+ rows,
} = props;
const displayedColumns = (hasSelectableRows ? [WorklistDataGridUtils.ROW_SELECTION_COLUMN] : []).concat(pinnedColumns).concat(overflowColumns);
@@ -179,7 +186,9 @@ const DataGrid = injectIntl((props) => {
const handleFocus = useRef(true);
const [checkResizable, setCheckResizable] = useState(false);
- const [focusedRow, setFocusedRow] = useState(0);
+
+ // if columns are not visible then set the first selectable row index to 1
+ const [focusedRow, setFocusedRow] = useState(hasVisibleColumnHeaders ? 0 : 1);
const [focusedCol, setFocusedCol] = useState(0);
const [gridHasFocus, setGridHasFocus] = useState(false);
@@ -455,7 +464,7 @@ const DataGrid = injectIntl((props) => {
event.preventDefault(); // prevent the page from moving with the arrow keys.
return;
}
- if (nextCol < 0 || nextRow < 0) {
+ if (nextCol < 0 || nextRow < (hasVisibleColumnHeaders ? 0 : 1)) {
event.preventDefault(); // prevent the page from moving with the arrow keys.
return;
}
@@ -525,6 +534,7 @@ const DataGrid = injectIntl((props) => {
onCellSelect={handleCellSelection}
onRowSelectionHeaderSelect={handleRowSelectionHeaderSelect}
hasSelectableRows={hasSelectableRows}
+ hasVisibleColumnHeaders={hasVisibleColumnHeaders}
isStriped
/>
diff --git a/packages/terra-data-grid/src/FlowsheetDataGrid.jsx b/packages/terra-data-grid/src/FlowsheetDataGrid.jsx
index 58ed6b7d51d..135383b0208 100644
--- a/packages/terra-data-grid/src/FlowsheetDataGrid.jsx
+++ b/packages/terra-data-grid/src/FlowsheetDataGrid.jsx
@@ -82,6 +82,11 @@ const propTypes = {
* The intl object containing translations. This is retrieved from the context automatically by injectIntl.
*/
intl: PropTypes.shape({ formatMessage: PropTypes.func }).isRequired,
+
+ /**
+ * Boolean to show/hide column headers. By default, it is set to `true` and column headers are visible.
+ */
+ hasVisibleColumnHeaders: PropTypes.bool,
};
const defaultProps = {
@@ -90,6 +95,7 @@ const defaultProps = {
rowHeight: '2.5rem',
rows: [],
columns: [],
+ hasVisibleColumnHeaders: true,
};
function FlowsheetDataGrid(props) {
@@ -106,6 +112,7 @@ function FlowsheetDataGrid(props) {
onClearSelectedCells,
onCellRangeSelect,
intl,
+ hasVisibleColumnHeaders,
} = props;
const anchorCell = useRef(null);
@@ -295,6 +302,7 @@ function FlowsheetDataGrid(props) {
onCellSelect={handleCellSelection}
onClearSelection={handleClearSelectedCells}
onCellRangeSelect={handleCellRangeSelection}
+ hasVisibleColumnHeaders={hasVisibleColumnHeaders}
/>
diff --git a/packages/terra-data-grid/tests/jest/__snapshots__/DataGrid.test.jsx.snap b/packages/terra-data-grid/tests/jest/__snapshots__/DataGrid.test.jsx.snap
index 4a42126b0a1..7257e879e74 100644
--- a/packages/terra-data-grid/tests/jest/__snapshots__/DataGrid.test.jsx.snap
+++ b/packages/terra-data-grid/tests/jest/__snapshots__/DataGrid.test.jsx.snap
@@ -160,6 +160,7 @@ exports[`DataGrid verifies onCellSelect callback is triggered when space is pres
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
focusFuncRef={null}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -320,6 +321,7 @@ exports[`DataGrid verifies onCellSelect callback is triggered when space is pres
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
focusFuncRef={null}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -488,6 +490,7 @@ exports[`DataGrid verifies onCellSelect callback is triggered when space is pres
@@ -3081,6 +3083,7 @@ exports[`DataGrid verifies onCellSelect callback is triggered when space is pres
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
focusFuncRef={null}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -3241,6 +3244,7 @@ exports[`DataGrid verifies onCellSelect callback is triggered when space is pres
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
focusFuncRef={null}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -3409,6 +3413,7 @@ exports[`DataGrid verifies onCellSelect callback is triggered when space is pres
@@ -5994,6 +5998,7 @@ exports[`DataGrid verifies row selection column header selection 1`] = `
defaultColumnWidth={200}
focusFuncRef={null}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -6145,6 +6150,7 @@ exports[`DataGrid verifies row selection column header selection 1`] = `
defaultColumnWidth={200}
focusFuncRef={null}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -6304,6 +6310,7 @@ exports[`DataGrid verifies row selection column header selection 1`] = `
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -6418,8 +6425,8 @@ exports[`DataGrid verifies row selection column header selection 1`] = `
@@ -9620,6 +9626,7 @@ exports[`DataGrid verifies that the grid created is consistent with the rows and
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
focusFuncRef={null}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -9757,6 +9764,7 @@ exports[`DataGrid verifies that the grid created is consistent with the rows and
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
focusFuncRef={null}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -9902,6 +9910,7 @@ exports[`DataGrid verifies that the grid created is consistent with the rows and
@@ -12468,6 +12476,7 @@ exports[`DataGrid verifies the rows are created with the right props 1`] = `
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
focusFuncRef={null}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -12602,6 +12611,7 @@ exports[`DataGrid verifies the rows are created with the right props 1`] = `
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
focusFuncRef={null}
+ hasVisibleColumnHeaders={true}
id="test-terra-data-grid"
intl={
Object {
@@ -12744,6 +12754,7 @@ exports[`DataGrid verifies the rows are created with the right props 1`] = `
diff --git a/packages/terra-data-grid/tests/jest/__snapshots__/FlowsheetDataGrid.test.jsx.snap b/packages/terra-data-grid/tests/jest/__snapshots__/FlowsheetDataGrid.test.jsx.snap
index da29d848835..876da7040e4 100644
--- a/packages/terra-data-grid/tests/jest/__snapshots__/FlowsheetDataGrid.test.jsx.snap
+++ b/packages/terra-data-grid/tests/jest/__snapshots__/FlowsheetDataGrid.test.jsx.snap
@@ -9,6 +9,7 @@ exports[`FlowsheetDataGrid renders the row header column as pinned and remaining
ariaLabel="Test Flowsheet Data Grid"
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
+ hasVisibleColumnHeaders={true}
id="test-terra-flowsheet-data-grid"
onCellRangeSelect={[Function]}
onCellSelect={[Function]}
@@ -130,6 +131,7 @@ exports[`FlowsheetDataGrid replaces non-header empty, null, or "--" cell content
ariaLabel="Test Flowsheet Data Grid"
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
+ hasVisibleColumnHeaders={true}
id="test-terra-flowsheet-data-grid"
onCellRangeSelect={[Function]}
onCellSelect={[Function]}
diff --git a/packages/terra-data-grid/tests/jest/__snapshots__/WorklistDataGrid.test.jsx.snap b/packages/terra-data-grid/tests/jest/__snapshots__/WorklistDataGrid.test.jsx.snap
index 0912c571ded..cac85f14d34 100644
--- a/packages/terra-data-grid/tests/jest/__snapshots__/WorklistDataGrid.test.jsx.snap
+++ b/packages/terra-data-grid/tests/jest/__snapshots__/WorklistDataGrid.test.jsx.snap
@@ -434,6 +434,7 @@ exports[`Row selection verifies Shift+Click enables row selection when row selec
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -543,6 +544,7 @@ exports[`Row selection verifies Shift+Click enables row selection when row selec
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -680,6 +682,7 @@ exports[`Row selection verifies Shift+Click enables row selection when row selec
@@ -3590,6 +3592,7 @@ exports[`Row selection verifies Shift+Click establishes anchor and selects row w
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -3700,6 +3703,7 @@ exports[`Row selection verifies Shift+Click establishes anchor and selects row w
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -3838,6 +3842,7 @@ exports[`Row selection verifies Shift+Click establishes anchor and selects row w
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -3952,8 +3957,8 @@ exports[`Row selection verifies Shift+Click establishes anchor and selects row w
@@ -7494,6 +7498,7 @@ exports[`Row selection verifies Shift+Click honors the anchor established by row
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -7604,6 +7609,7 @@ exports[`Row selection verifies Shift+Click honors the anchor established by row
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -7742,6 +7748,7 @@ exports[`Row selection verifies Shift+Click honors the anchor established by row
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -7856,8 +7863,8 @@ exports[`Row selection verifies Shift+Click honors the anchor established by row
@@ -11378,6 +11384,7 @@ exports[`Row selection verifies Shift+Space enables row selection when row selec
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -11487,6 +11494,7 @@ exports[`Row selection verifies Shift+Space enables row selection when row selec
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -11624,6 +11632,7 @@ exports[`Row selection verifies Shift+Space enables row selection when row selec
@@ -14534,6 +14542,7 @@ exports[`Row selection verifies Shift+Space establishes anchor and selects row i
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -14644,6 +14653,7 @@ exports[`Row selection verifies Shift+Space establishes anchor and selects row i
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -14782,6 +14792,7 @@ exports[`Row selection verifies Shift+Space establishes anchor and selects row i
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -14896,8 +14907,8 @@ exports[`Row selection verifies Shift+Space establishes anchor and selects row i
@@ -18438,6 +18448,7 @@ exports[`Row selection verifies Shift+Space honors the anchor established by row
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -18548,6 +18559,7 @@ exports[`Row selection verifies Shift+Space honors the anchor established by row
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -18686,6 +18698,7 @@ exports[`Row selection verifies Shift+Space honors the anchor established by row
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -18800,8 +18813,8 @@ exports[`Row selection verifies Shift+Space honors the anchor established by row
@@ -22390,6 +22402,7 @@ exports[`Row selection verifies callbacks when Shift+Down contracts the range of
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -22500,6 +22513,7 @@ exports[`Row selection verifies callbacks when Shift+Down contracts the range of
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -22638,6 +22652,7 @@ exports[`Row selection verifies callbacks when Shift+Down contracts the range of
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -22752,8 +22767,8 @@ exports[`Row selection verifies callbacks when Shift+Down contracts the range of
@@ -26262,6 +26276,7 @@ exports[`Row selection verifies callbacks when Shift+Down is used and row select
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -26372,6 +26387,7 @@ exports[`Row selection verifies callbacks when Shift+Down is used and row select
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -26510,6 +26526,7 @@ exports[`Row selection verifies callbacks when Shift+Down is used and row select
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -26624,8 +26641,8 @@ exports[`Row selection verifies callbacks when Shift+Down is used and row select
@@ -30184,6 +30200,7 @@ exports[`Row selection verifies callbacks when Shift+Down is used and row select
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -30293,6 +30310,7 @@ exports[`Row selection verifies callbacks when Shift+Down is used and row select
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -30430,6 +30448,7 @@ exports[`Row selection verifies callbacks when Shift+Down is used and row select
@@ -33348,6 +33366,7 @@ exports[`Row selection verifies callbacks when Shift+Down more than one. 1`] = `
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -33458,6 +33477,7 @@ exports[`Row selection verifies callbacks when Shift+Down more than one. 1`] = `
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -33596,6 +33616,7 @@ exports[`Row selection verifies callbacks when Shift+Down more than one. 1`] = `
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -33710,8 +33731,8 @@ exports[`Row selection verifies callbacks when Shift+Down more than one. 1`] = `
@@ -37252,6 +37272,7 @@ exports[`Row selection verifies multiple independent ranges can be created with
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -37362,6 +37383,7 @@ exports[`Row selection verifies multiple independent ranges can be created with
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -37500,6 +37522,7 @@ exports[`Row selection verifies multiple independent ranges can be created with
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -37614,8 +37637,8 @@ exports[`Row selection verifies multiple independent ranges can be created with
@@ -41116,6 +41138,7 @@ exports[`Row selection verifies only onRowSelect is called when mouse is used to
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -41226,6 +41249,7 @@ exports[`Row selection verifies only onRowSelect is called when mouse is used to
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -41364,6 +41388,7 @@ exports[`Row selection verifies only onRowSelect is called when mouse is used to
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -41478,8 +41503,8 @@ exports[`Row selection verifies only onRowSelect is called when mouse is used to
@@ -44980,6 +45004,7 @@ exports[`Row selection verifies only onRowSelect is called when mouse is used to
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -45090,6 +45115,7 @@ exports[`Row selection verifies only onRowSelect is called when mouse is used to
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -45228,6 +45254,7 @@ exports[`Row selection verifies only onRowSelect is called when mouse is used to
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -45342,8 +45369,8 @@ exports[`Row selection verifies only onRowSelect is called when mouse is used to
@@ -48844,6 +48870,7 @@ exports[`Row selection verifies only onRowSelect is called when space is used to
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -48954,6 +48981,7 @@ exports[`Row selection verifies only onRowSelect is called when space is used to
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -49092,6 +49120,7 @@ exports[`Row selection verifies only onRowSelect is called when space is used to
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -49206,8 +49235,8 @@ exports[`Row selection verifies only onRowSelect is called when space is used to
@@ -52708,6 +52736,7 @@ exports[`Row selection verifies only onRowSelect is called when space is used to
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -52818,6 +52847,7 @@ exports[`Row selection verifies only onRowSelect is called when space is used to
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -52956,6 +52986,7 @@ exports[`Row selection verifies only onRowSelect is called when space is used to
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -53070,8 +53101,8 @@ exports[`Row selection verifies only onRowSelect is called when space is used to
@@ -56568,6 +56598,7 @@ exports[`Row selection verifies row selection when space is pressed on a masked
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -56678,6 +56709,7 @@ exports[`Row selection verifies row selection when space is pressed on a masked
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -56816,6 +56848,7 @@ exports[`Row selection verifies row selection when space is pressed on a masked
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -56930,8 +56963,8 @@ exports[`Row selection verifies row selection when space is pressed on a masked
@@ -60428,6 +60460,7 @@ exports[`Row selection verifies row selection when space is pressed on a non-sel
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -60538,6 +60571,7 @@ exports[`Row selection verifies row selection when space is pressed on a non-sel
}
}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -60676,6 +60710,7 @@ exports[`Row selection verifies row selection when space is pressed on a non-sel
columnHeaderHeight="2.5rem"
defaultColumnWidth={200}
hasSelectableRows={true}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid-table"
isActiveColumnResizing={false}
isStriped={true}
@@ -60790,8 +60825,8 @@ exports[`Row selection verifies row selection when space is pressed on a non-sel
@@ -64246,6 +64280,7 @@ exports[`WorklistDataGrid verifies onCellSelect callback is not triggered when s
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -64355,6 +64390,7 @@ exports[`WorklistDataGrid verifies onCellSelect callback is not triggered when s
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -64492,6 +64528,7 @@ exports[`WorklistDataGrid verifies onCellSelect callback is not triggered when s
@@ -67316,6 +67352,7 @@ exports[`WorklistDataGrid verifies onCellSelect callback is not triggered when s
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
onCellSelect={[Function]}
onClearSelection={[Function]}
@@ -67425,6 +67462,7 @@ exports[`WorklistDataGrid verifies onCellSelect callback is not triggered when s
},
}
}
+ hasVisibleColumnHeaders={true}
id="test-terra-worklist-data-grid"
intl={
Object {
@@ -67562,6 +67600,7 @@ exports[`WorklistDataGrid verifies onCellSelect callback is not triggered when s
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/cell-3-1-focused.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/cell-3-1-focused.png
index cc2049011fc..0d12194ee82 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/cell-3-1-focused.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/cell-3-1-focused.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png
new file mode 100644
index 00000000000..dd95e4812a8
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png
new file mode 100644
index 00000000000..0e95ebc4fa9
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-1-1-focus-3-1.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-1-1-focus-3-1.png
index 7876ba89363..6b5b091d7eb 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-1-1-focus-3-1.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-1-1-focus-3-1.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-1-0.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-1-0.png
index 63af0f8f448..062339ee17f 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-1-0.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-1-0.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-3-1-with-hover.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-3-1-with-hover.png
index cc2049011fc..0d12194ee82 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-3-1-with-hover.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-3-1-with-hover.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-3-1.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-3-1.png
index 2cc9ebb5aec..cd2581d5f8a 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-3-1.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-3-1-focus-3-1.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-4-2-focus-4-2.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-4-2-focus-4-2.png
index 73f8cac125a..6bb3c4445b4 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-4-2-focus-4-2.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-4-2-focus-4-2.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-and-focus-on-1-1.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-and-focus-on-1-1.png
index 1b05af43d0e..938678c8d8a 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-and-focus-on-1-1.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-and-focus-on-1-1.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-1-focus-3-0.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-1-focus-3-0.png
index 5b43138275f..00e88fd4fb1 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-1-focus-3-0.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-1-focus-3-0.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-2.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-2.png
index 927adcb7a53..cd1de6cd7dc 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-2.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-2.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-click-range-3-1-to-4-2.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-click-range-3-1-to-4-2.png
index 512ef7e877f..46f196ba6f0 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-click-range-3-1-to-4-2.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-click-range-3-1-to-4-2.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-space-range-1-1-to-3-2.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-space-range-1-1-to-3-2.png
index 927adcb7a53..cd1de6cd7dc 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-space-range-1-1-to-3-2.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/flowsheet-data-grid-spec/selection-space-range-1-1-to-3-2.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/cell-3-1-focused.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/cell-3-1-focused.png
index cc2049011fc..0d12194ee82 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/cell-3-1-focused.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/cell-3-1-focused.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png
new file mode 100644
index 00000000000..dd95e4812a8
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png
new file mode 100644
index 00000000000..0e95ebc4fa9
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-1-1-focus-3-1.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-1-1-focus-3-1.png
index 7876ba89363..6b5b091d7eb 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-1-1-focus-3-1.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-1-1-focus-3-1.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-1-0.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-1-0.png
index 63af0f8f448..062339ee17f 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-1-0.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-1-0.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-3-1-with-hover.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-3-1-with-hover.png
index cc2049011fc..0d12194ee82 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-3-1-with-hover.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-3-1-with-hover.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-3-1.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-3-1.png
index 2cc9ebb5aec..cd2581d5f8a 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-3-1.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-3-1-focus-3-1.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-4-2-focus-4-2.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-4-2-focus-4-2.png
index 73f8cac125a..6bb3c4445b4 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-4-2-focus-4-2.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-4-2-focus-4-2.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-and-focus-on-1-1.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-and-focus-on-1-1.png
index 1b05af43d0e..938678c8d8a 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-and-focus-on-1-1.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-and-focus-on-1-1.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-1-focus-3-0.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-1-focus-3-0.png
index 5b43138275f..00e88fd4fb1 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-1-focus-3-0.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-1-focus-3-0.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-2.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-2.png
index 927adcb7a53..cd1de6cd7dc 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-2.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-arrows-range-1-1-to-3-2.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-click-range-3-1-to-4-2.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-click-range-3-1-to-4-2.png
index 512ef7e877f..46f196ba6f0 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-click-range-3-1-to-4-2.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-click-range-3-1-to-4-2.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-space-range-1-1-to-3-2.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-space-range-1-1-to-3-2.png
index 927adcb7a53..cd1de6cd7dc 100644
Binary files a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-space-range-1-1-to-3-2.png and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/clinical-lowlight-theme/en/chrome_medium/flowsheet-data-grid-spec/selection-space-range-1-1-to-3-2.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png
new file mode 100644
index 00000000000..414f9aac140
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png
new file mode 100644
index 00000000000..80389460968
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png
new file mode 100644
index 00000000000..414f9aac140
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png
new file mode 100644
index 00000000000..80389460968
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png
new file mode 100644
index 00000000000..c36ffa5025e
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_large/flowsheet-data-grid-spec/default-flowsheet-data-grid.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png
new file mode 100644
index 00000000000..f7654f39b48
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_large/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png
new file mode 100644
index 00000000000..c36ffa5025e
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/flowsheet-data-grid-spec/default-flowsheet-data-grid.png differ
diff --git a/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png
new file mode 100644
index 00000000000..f7654f39b48
Binary files /dev/null and b/packages/terra-data-grid/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/flowsheet-data-grid-spec/flowsheet-data-grid-no-column-headers.png differ
diff --git a/packages/terra-data-grid/tests/wdio/flowsheet-data-grid-spec.js b/packages/terra-data-grid/tests/wdio/flowsheet-data-grid-spec.js
index 0fb7c43d0e6..7cb39c50a2f 100644
--- a/packages/terra-data-grid/tests/wdio/flowsheet-data-grid-spec.js
+++ b/packages/terra-data-grid/tests/wdio/flowsheet-data-grid-spec.js
@@ -31,6 +31,37 @@ const clickCell = (row, col, selector) => {
};
Terra.describeViewports('FlowsheetDataGrid', ['medium', 'large'], () => {
+ describe('FlowsheetDataGrid configuration', () => {
+ it('renders a default data grid', () => {
+ browser.url('/raw/tests/cerner-terra-framework-docs/data-grid/flowsheet-data-grid/default-flowsheet-data-grid');
+ Terra.validates.element('default-flowsheet-data-grid', { selector: defaultSelector });
+ });
+
+ describe('flowsheet data grid with no column headers', () => {
+ before(() => {
+ browser.url('/raw/tests/cerner-terra-framework-docs/data-grid/flowsheet-data-grid/column-headers-hidden');
+ });
+
+ it('renders a flowsheet data grid without column headers', () => {
+ expect(browser.$('//thead').getCSSProperty('height').parsed.value).toBe(0);
+ Terra.validates.element('flowsheet-data-grid-no-column-headers', { selector: '#terra-flowsheet-data-grid-no-column-headers-table' });
+ });
+
+ it('tabs into (1, 0) instead of (0, 0)', () => {
+ browser.keys(['Tab']);
+ expect(browser.$('//*[@id="terra-flowsheet-data-grid-no-column-headers-table-rowheader-1"]').isFocused()).toBe(true);
+ });
+
+ it('does not focus the header column', () => {
+ browser.keys(['ArrowDown']);
+ expect(browser.$('//*[@id="terra-flowsheet-data-grid-no-column-headers-table-rowheader-2"]').isFocused()).toBe(true);
+
+ browser.keys(['ArrowUp', 'ArrowUp']);
+ expect(browser.$('//*[@id="terra-flowsheet-data-grid-no-column-headers-table-rowheader-1"]').isFocused()).toBe(true);
+ });
+ });
+ });
+
describe('Cell selection', () => {
beforeEach(() => {
browser.url('/raw/tests/cerner-terra-framework-docs/data-grid/flowsheet-data-grid/default-flowsheet-data-grid');
diff --git a/packages/terra-framework-docs/CHANGELOG.md b/packages/terra-framework-docs/CHANGELOG.md
index d91ebdf98d5..788a6f442d1 100644
--- a/packages/terra-framework-docs/CHANGELOG.md
+++ b/packages/terra-framework-docs/CHANGELOG.md
@@ -4,9 +4,12 @@
* Added
* Added examples and tests for `terra-folder-tree`.
+ * Added `hasVisibleColumnHeaders` example for FlowsheetDataGrid.
* Updated
* Updated About page of `terra-table` to provide accessibility documentation for Home and End keys.
+ * Removed alpha notice for FlowsheetDataGrid.
+
## 1.44.0 - (November 9, 2023)
diff --git a/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/About.5.doc.mdx b/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/About.5.doc.mdx
index f2ea505dc9b..74c6663d74a 100644
--- a/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/About.5.doc.mdx
+++ b/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/About.5.doc.mdx
@@ -7,11 +7,6 @@ import FlowsheetDataGridPropsTable from 'terra-data-grid/src/FlowsheetDataGrid?d
# Terra FlowsheetDataGrid
-
-Terra Data Grid is currently under alpha release. There may be breaking changes between releases until it is stable with the 1.0 release.
-
-
-
## Getting Started
- Install with [npmjs](https://www.npmjs.com):
diff --git a/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/ColumnHeadersHidden.4.doc.mdx b/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/ColumnHeadersHidden.4.doc.mdx
new file mode 100644
index 00000000000..9ae98e36ce4
--- /dev/null
+++ b/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/ColumnHeadersHidden.4.doc.mdx
@@ -0,0 +1,21 @@
+import ColumnHeadersHidden from './ColumnHeadersHidden?dev-site-example';
+
+# Hiding Column Headers
+
+### Description
+The [Flowsheet Data Grid](/components/cerner-terra-framework-docs/data-grid/flowsheet-data-grid/about) can hide column headers with the `hasVisibleColumnHeaders` prop.
+
+### Usage
+The `hasVisibleColumns` is a boolean. By default, it is set to `true`.
+When it is set to `false`, the column headers are hidden, but still exist in the DOM and can be read by screenreaders when providing context for the table.
+This is useful when needing to use custom alternative to column headers, such as Stella Timeline.
+
+**Note:**
+- Column header labels should still be provided in the dataset to ensure that sceenreaders will still read out the appropriate context for the table.
+- When using custom column headers, then logic must be added to ensure that the column widths match are in sync if resizing columns are enabled.
+The [columns.width](/components/cerner-terra-framework-docs/data-grid/flowsheet-data-grid/about#column) property for columns can be used to set the column widths programatically.
+
+
diff --git a/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/ColumnHeadersHidden.jsx b/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/ColumnHeadersHidden.jsx
new file mode 100644
index 00000000000..6c295b3794d
--- /dev/null
+++ b/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/ColumnHeadersHidden.jsx
@@ -0,0 +1,134 @@
+import React, { useState, useCallback } from 'react';
+import { FlowsheetDataGrid } from 'terra-data-grid';
+
+const ColumnHeadersHidden = () => {
+ const gridDataJSON = {
+ cols: [
+ { id: 'Column-0', displayName: 'Vitals', isSelectable: false },
+ { id: 'Column-1', displayName: 'March 16' },
+ { id: 'Column-2', displayName: 'March 17' },
+ { id: 'Column-3', displayName: 'March 18' },
+ ],
+ rows: [
+ {
+ id: '1',
+ cells: [
+ { content: 'Heart Rate Monitored (bpm)' },
+ { content: '68' },
+ { content: '66' },
+ { content: '67' },
+ ],
+ },
+ {
+ id: '2',
+ cells: [
+ { content: 'Temperature Oral (degC)' },
+ { content: '36.7' },
+ { content: '36.9' },
+ { content: '37' },
+ ],
+ },
+ {
+ id: '3',
+ cells: [
+ { content: 'Cardiac Index (L/min/m2)' },
+ { content: '2.25' },
+ { content: '2.28' },
+ { content: null },
+ ],
+ },
+ {
+ id: '4',
+ cells: [
+ { content: 'ICP (mmHg)' },
+ { content: null },
+ { content: '11' },
+ { content: '12' },
+ ],
+ },
+ {
+ id: '5',
+ cells: [
+ { content: 'CPP (mmHg)' },
+ { content: '63' },
+ { content: null },
+ { content: '48' },
+ ],
+ },
+ ],
+ };
+
+ const { cols, rows } = gridDataJSON;
+ const [rowData, setRowData] = useState(rows);
+
+ const onCellSelect = useCallback((rowId, columnId) => {
+ if (rowId && columnId) {
+ const rowIndex = rowData.findIndex(e => e.id === rowId);
+ const columnIndex = cols.findIndex(e => e.id === columnId);
+ let otherSelectionsExist = false;
+
+ // Remove cell selections, excluding current cell
+ const newRowData = [...rowData];
+ for (let row = 0; row < rowData.length; row += 1) {
+ for (let cell = 0; cell < rowData[row].cells.length; cell += 1) {
+ const currentCell = rowData[row].cells[cell];
+ if (currentCell.isSelected && !(row === rowIndex && cell === columnIndex)) {
+ currentCell.isSelected = false;
+ otherSelectionsExist = true;
+ }
+ }
+ }
+
+ // If the current cell is the only selected cell, toggle it to unselected. Otherwise, set it to selected.
+ newRowData[rowIndex].cells[columnIndex].isSelected = !rowData[rowIndex].cells[columnIndex].isSelected || otherSelectionsExist;
+ setRowData(newRowData);
+ }
+ }, [cols, rowData]);
+
+ const onClearSelectedCells = useCallback(() => {
+ // Remove current selections
+ const newRowData = [...rowData];
+ for (let row = 0; row < rowData.length; row += 1) {
+ for (let cell = 0; cell < rowData[row].cells.length; cell += 1) {
+ newRowData[row].cells[cell].isSelected = false;
+ }
+ }
+
+ setRowData(newRowData);
+ }, [rowData]);
+
+ const onCellRangeSelect = useCallback((cells) => {
+ const newRowData = [...rowData];
+
+ // Remove current selections
+ for (let row = 0; row < rowData.length; row += 1) {
+ for (let cell = 0; cell < rowData[row].cells.length; cell += 1) {
+ newRowData[row].cells[cell].isSelected = false;
+ }
+ }
+
+ cells.forEach((cell) => {
+ const rowIndex = rowData.findIndex(e => e.id === cell.rowId);
+ const columnIndex = cols.findIndex(e => e.id === cell.columnId);
+
+ newRowData[rowIndex].cells[columnIndex].isSelected = true;
+ });
+
+ setRowData(newRowData);
+ }, [cols, rowData]);
+
+ return (
+
+ );
+};
+
+export default ColumnHeadersHidden;
diff --git a/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/NoResultCells.2.doc.mdx b/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/NoResultCells.2.doc.mdx
index f5d186c4fe9..0465ff3dd42 100644
--- a/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/NoResultCells.2.doc.mdx
+++ b/packages/terra-framework-docs/src/terra-dev-site/doc/data-grid/FlowsheetDataGrid.4/Examples.6/NoResultCells.2.doc.mdx
@@ -1,6 +1,6 @@
import NoResultCells from './NoResultCells?dev-site-example';
diff --git a/packages/terra-framework-docs/src/terra-dev-site/doc/table/Examples/TableWithoutHeaders.jsx b/packages/terra-framework-docs/src/terra-dev-site/doc/table/Examples/TableWithoutHeaders.jsx
index c97c04fcec8..ea5b2cd7f9f 100644
--- a/packages/terra-framework-docs/src/terra-dev-site/doc/table/Examples/TableWithoutHeaders.jsx
+++ b/packages/terra-framework-docs/src/terra-dev-site/doc/table/Examples/TableWithoutHeaders.jsx
@@ -56,7 +56,7 @@ const TableWithoutHeaders = () => {
id="table-without-headers"
overflowColumns={cols}
rows={rows}
- hasColumnHeaders={false}
+ hasVisibleColumnHeaders={false}
/>
);
};
diff --git a/packages/terra-framework-docs/src/terra-dev-site/test/data-grid/flowsheet-data-grid/ColumnHeadersHidden.test.jsx b/packages/terra-framework-docs/src/terra-dev-site/test/data-grid/flowsheet-data-grid/ColumnHeadersHidden.test.jsx
new file mode 100644
index 00000000000..86d3d967dce
--- /dev/null
+++ b/packages/terra-framework-docs/src/terra-dev-site/test/data-grid/flowsheet-data-grid/ColumnHeadersHidden.test.jsx
@@ -0,0 +1,134 @@
+import React, { useState, useCallback } from 'react';
+import { FlowsheetDataGrid } from 'terra-data-grid';
+
+const ColumnHeadersHidden = () => {
+ const gridDataJSON = {
+ cols: [
+ { id: 'Column-0', displayName: 'Vitals', isSelectable: false },
+ { id: 'Column-1', displayName: 'March 16' },
+ { id: 'Column-2', displayName: 'March 17' },
+ { id: 'Column-3', displayName: 'March 18' },
+ ],
+ rows: [
+ {
+ id: '1',
+ cells: [
+ { content: 'Heart Rate Monitored (bpm)' },
+ { content: '68' },
+ { content: '66' },
+ { content: '67' },
+ ],
+ },
+ {
+ id: '2',
+ cells: [
+ { content: 'Temperature Oral (degC)' },
+ { content: '36.7' },
+ { content: '36.9' },
+ { content: '37' },
+ ],
+ },
+ {
+ id: '3',
+ cells: [
+ { content: 'Cardiac Index (L/min/m2)' },
+ { content: '2.25' },
+ { content: '2.28' },
+ { content: null },
+ ],
+ },
+ {
+ id: '4',
+ cells: [
+ { content: 'ICP (mmHg)' },
+ { content: null },
+ { content: '11' },
+ { content: '12' },
+ ],
+ },
+ {
+ id: '5',
+ cells: [
+ { content: 'CPP (mmHg)' },
+ { content: '63' },
+ { content: null },
+ { content: '48' },
+ ],
+ },
+ ],
+ };
+
+ const { cols, rows } = gridDataJSON;
+ const [rowData, setRowData] = useState(rows);
+
+ const onCellSelect = useCallback((rowId, columnId) => {
+ if (rowId && columnId) {
+ const rowIndex = rowData.findIndex(e => e.id === rowId);
+ const columnIndex = cols.findIndex(e => e.id === columnId);
+ let otherSelectionsExist = false;
+
+ // Remove cell selections, excluding current cell
+ const newRowData = [...rowData];
+ for (let row = 0; row < rowData.length; row += 1) {
+ for (let cell = 0; cell < rowData[row].cells.length; cell += 1) {
+ const currentCell = rowData[row].cells[cell];
+ if (currentCell.isSelected && !(row === rowIndex && cell === columnIndex)) {
+ currentCell.isSelected = false;
+ otherSelectionsExist = true;
+ }
+ }
+ }
+
+ // If the current cell is the only selected cell, toggle it to unselected. Otherwise, set it to selected.
+ newRowData[rowIndex].cells[columnIndex].isSelected = !rowData[rowIndex].cells[columnIndex].isSelected || otherSelectionsExist;
+ setRowData(newRowData);
+ }
+ }, [cols, rowData]);
+
+ const onClearSelectedCells = useCallback(() => {
+ // Remove current selections
+ const newRowData = [...rowData];
+ for (let row = 0; row < rowData.length; row += 1) {
+ for (let cell = 0; cell < rowData[row].cells.length; cell += 1) {
+ newRowData[row].cells[cell].isSelected = false;
+ }
+ }
+
+ setRowData(newRowData);
+ }, [rowData]);
+
+ const onCellRangeSelect = useCallback((cells) => {
+ const newRowData = [...rowData];
+
+ // Remove current selections
+ for (let row = 0; row < rowData.length; row += 1) {
+ for (let cell = 0; cell < rowData[row].cells.length; cell += 1) {
+ newRowData[row].cells[cell].isSelected = false;
+ }
+ }
+
+ cells.forEach((cell) => {
+ const rowIndex = rowData.findIndex(e => e.id === cell.rowId);
+ const columnIndex = cols.findIndex(e => e.id === cell.columnId);
+
+ newRowData[rowIndex].cells[columnIndex].isSelected = true;
+ });
+
+ setRowData(newRowData);
+ }, [cols, rowData]);
+
+ return (
+
+ );
+};
+
+export default ColumnHeadersHidden;
diff --git a/packages/terra-framework-docs/src/terra-dev-site/test/table/TableWithoutHeaders.test.jsx b/packages/terra-framework-docs/src/terra-dev-site/test/table/TableWithoutHeaders.test.jsx
index 20fcaa98ba0..44be85f57f7 100644
--- a/packages/terra-framework-docs/src/terra-dev-site/test/table/TableWithoutHeaders.test.jsx
+++ b/packages/terra-framework-docs/src/terra-dev-site/test/table/TableWithoutHeaders.test.jsx
@@ -76,7 +76,7 @@ const TableWithoutHeaders = () => {
id="table-without-headers"
overflowColumns={cols}
rows={rows}
- hasColumnHeaders={false}
+ hasVisibleColumnHeaders={false}
/>
);
};
diff --git a/packages/terra-table/CHANGELOG.md b/packages/terra-table/CHANGELOG.md
index ec804d57497..65c6c12036e 100644
--- a/packages/terra-table/CHANGELOG.md
+++ b/packages/terra-table/CHANGELOG.md
@@ -2,6 +2,9 @@
## Unreleased
+* Breaking Changes
+ * Renamed `hasColumnHeaders` prop to `hasVisibleColumnHeaders`.
+
* Added
* Added navigation via Home and End Keys.
* Added title attribute to column header cells to enable tooltips.
diff --git a/packages/terra-table/src/Table.jsx b/packages/terra-table/src/Table.jsx
index fb10e79f49f..da5a2d45091 100644
--- a/packages/terra-table/src/Table.jsx
+++ b/packages/terra-table/src/Table.jsx
@@ -147,7 +147,7 @@ const propTypes = {
* Boolean indicating whether or not the table columns should be displayed. Setting the value to false will hide the columns,
* but the voice reader will use the column header values for a11y.
*/
- hasColumnHeaders: PropTypes.bool,
+ hasVisibleColumnHeaders: PropTypes.bool,
/*
* Boolean specifying whether or not the table should have zebra striping for rows.
@@ -169,7 +169,7 @@ const defaultProps = {
pinnedColumns: [],
overflowColumns: [],
rows: [],
- hasColumnHeaders: true,
+ hasVisibleColumnHeaders: true,
};
const defaultColumnMinimumWidth = 60;
@@ -197,7 +197,7 @@ function Table(props) {
onRowSelect,
onRowSelectionHeaderSelect,
hasSelectableRows,
- hasColumnHeaders,
+ hasVisibleColumnHeaders,
isStriped,
rowHeaderIndex,
intl,
@@ -539,7 +539,7 @@ function Table(props) {
aria-labelledby={ariaLabelledBy}
aria-label={ariaLabel}
aria-rowcount={tableRowCount}
- className={cx('table', theme.className, { headerless: !hasColumnHeaders })}
+ className={cx('table', theme.className, { headerless: !hasVisibleColumnHeaders })}
onKeyDown={!isGridContext ? onKeyDown : undefined}
{...(activeIndex != null && { onMouseUp, onMouseMove, onMouseLeave: onMouseUp })}
>
@@ -558,7 +558,7 @@ function Table(props) {
isActiveColumnResizing={isActiveColumnResizing}
activeColumnIndex={activeColumnIndex}
columns={tableColumns}
- hasColumnHeaders={hasColumnHeaders}
+ hasVisibleColumnHeaders={hasVisibleColumnHeaders}
headerHeight={columnHeaderHeight}
columnResizeIncrement={columnResizeIncrement}
tableHeight={tableHeight}
diff --git a/packages/terra-table/src/subcomponents/ColumnHeader.jsx b/packages/terra-table/src/subcomponents/ColumnHeader.jsx
index 0cf04e34cd2..7f7e6a351c1 100644
--- a/packages/terra-table/src/subcomponents/ColumnHeader.jsx
+++ b/packages/terra-table/src/subcomponents/ColumnHeader.jsx
@@ -59,11 +59,11 @@ const propTypes = {
/**
* Boolean indicating whether or not the table columns should be displayed.
*/
- hasColumnHeaders: PropTypes.bool,
+ hasVisibleColumnHeaders: PropTypes.bool,
};
const defaultProps = {
- hasColumnHeaders: true,
+ hasVisibleColumnHeaders: true,
};
const ColumnHeader = (props) => {
@@ -78,15 +78,14 @@ const ColumnHeader = (props) => {
onColumnSelect,
onResizeMouseDown,
onResizeHandleChange,
- hasColumnHeaders,
+ hasVisibleColumnHeaders,
} = props;
return (
{columns.map((column, columnIndex) => (
{
minimumWidth={column.minimumWidth}
maximumWidth={column.maximumWidth}
headerHeight={headerHeight}
- isResizable={hasColumnHeaders && column.isResizable}
- isSelectable={hasColumnHeaders && column.isSelectable}
+ isResizable={hasVisibleColumnHeaders && column.isResizable}
+ isSelectable={hasVisibleColumnHeaders && column.isSelectable}
tableHeight={tableHeight}
isActive={activeColumnIndex === columnIndex}
isResizeActive={activeColumnIndex === columnIndex && isActiveColumnResizing}
diff --git a/packages/terra-table/tests/jest/ColumnHeader.test.jsx b/packages/terra-table/tests/jest/ColumnHeader.test.jsx
index 16541b9a164..4e0035e5fee 100644
--- a/packages/terra-table/tests/jest/ColumnHeader.test.jsx
+++ b/packages/terra-table/tests/jest/ColumnHeader.test.jsx
@@ -134,7 +134,7 @@ describe('ColumnHeader', () => {
expect(wrapper).toMatchSnapshot();
});
- it('verifies that the hasColumnHeaders prop hides the table column headers when set to false', () => {
+ it('verifies that the hasVisibleColumnHeaders prop hides the table column headers when set to false', () => {
const columns = [{
id: 'Column-0',
displayName: ' Vitals',
@@ -147,7 +147,7 @@ describe('ColumnHeader', () => {
,
);
@@ -173,7 +173,7 @@ describe('ColumnHeader', () => {
tableId="test-table"
columns={columns}
headerHeight="3rem"
- hasColumnHeaders
+ hasVisibleColumnHeaders
/>,
);
diff --git a/packages/terra-table/tests/jest/__snapshots__/ColumnHeader.test.jsx.snap b/packages/terra-table/tests/jest/__snapshots__/ColumnHeader.test.jsx.snap
index e0fbbf6c655..3c01314475b 100644
--- a/packages/terra-table/tests/jest/__snapshots__/ColumnHeader.test.jsx.snap
+++ b/packages/terra-table/tests/jest/__snapshots__/ColumnHeader.test.jsx.snap
@@ -3,7 +3,6 @@
exports[`ColumnHeader renders a column header with an active resize column 1`] = `
@@ -38,7 +37,6 @@ exports[`ColumnHeader renders a column header with an active resize column 1`] =
exports[`ColumnHeader renders a column header with callbacks 1`] = `
@@ -77,7 +75,6 @@ exports[`ColumnHeader renders a column header with callbacks 1`] = `
exports[`ColumnHeader renders a column header with tableHeight prop 1`] = `
@@ -112,7 +109,6 @@ exports[`ColumnHeader renders a column header with tableHeight prop 1`] = `
exports[`ColumnHeader renders a default column header 1`] = `
@@ -145,7 +141,6 @@ exports[`ColumnHeader renders a default column header 1`] = `
exports[`ColumnHeader verifies that the column headers are not hidden when the hasColumnHeader is true 1`] = `
@@ -175,10 +170,9 @@ exports[`ColumnHeader verifies that the column headers are not hidden when the h
`;
-exports[`ColumnHeader verifies that the hasColumnHeaders prop hides the table column headers when set to false 1`] = `
+exports[`ColumnHeader verifies that the hasVisibleColumnHeaders prop hides the table column headers when set to false 1`] = `