This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
[flowsheet-data-grid] Hide columns headers #1882
Merged
Merged
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
7f3164d
updated flowsheet datagrid to no longer have columns
sdadn dd531ac
updated screenshots
sdadn 2000abd
updated snapshots
sdadn ed71e7a
updated props
sdadn 2695239
updated implementation & examples
sdadn 2ff6581
updated undefined error
sdadn 7c82eca
updated jest snapshots
sdadn 5d50a10
updated wdio screenshots
sdadn f619dc4
added examples
sdadn c7705b1
updated CHANGELOGs
sdadn 6bb658a
updated screenshots
sdadn 9a95bbd
linter fixes
sdadn 6bf4017
fixed examples
sdadn 4e96fbb
updated example
sdadn e314504
updated prop
sdadn b95e1ac
updated CHANGELOG
sdadn 5f405b3
updated prop
sdadn 3dfb79b
updated datagrid to not allow navigation to hidden header columns
sdadn 69e447c
Merge branch 'main' into hide-flowsheet-column-header
sdadn a29f395
wdio tests wip
sdadn d528416
Merge branch 'hide-flowsheet-column-header' of github.com:cerner/terr…
sdadn 523a90b
working wdio tests
sdadn 0d47e8f
updated jest snapshots
sdadn 95fcf31
removed only from tests
sdadn e616978
finished renaming prop
sdadn eeb124d
updated docs
sdadn 8dbbd5a
linter fixes
sdadn 33d3ebf
updated wdio tests
sdadn 2606bcd
Update CHANGELOG.md
sdadn a561ac9
Update CHANGELOG.md
sdadn 766fbf5
updated keyboard navigation logic
sdadn 5808984
Merge branch 'main' into hide-flowsheet-column-header
sdadn 3e03f99
Merge branch 'hide-flowsheet-column-header' of github.com:cerner/terr…
sdadn a69cf68
Update CHANGELOG.md
sdadn f38c857
Merge branch 'main' into hide-flowsheet-column-header
sdadn 9fe8502
updated jest snapshots
sdadn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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. | ||||||
*/ | ||||||
hasColumnHeaders: PropTypes.bool, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It has column headers. They're just invisible 🫥
Suggested change
|
||||||
}; | ||||||
|
||||||
const defaultProps = { | ||||||
|
@@ -136,29 +141,31 @@ const defaultProps = { | |||||
pinnedColumns: [], | ||||||
overflowColumns: [], | ||||||
rows: [], | ||||||
hasColumnHeaders: true, | ||||||
}; | ||||||
|
||||||
const DataGrid = injectIntl((props) => { | ||||||
const { | ||||||
id, | ||||||
ariaLabelledBy, | ||||||
ariaLabel, | ||||||
rows, | ||||||
pinnedColumns, | ||||||
overflowColumns, | ||||||
onColumnResize, | ||||||
defaultColumnWidth, | ||||||
ariaLabelledBy, | ||||||
columnHeaderHeight, | ||||||
columnResizeIncrement, | ||||||
rowHeight, | ||||||
onColumnSelect, | ||||||
defaultColumnWidth, | ||||||
hasColumnHeaders, | ||||||
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); | ||||||
|
@@ -520,6 +527,7 @@ const DataGrid = injectIntl((props) => { | |||||
onCellSelect={handleCellSelection} | ||||||
onRowSelectionHeaderSelect={handleRowSelectionHeaderSelect} | ||||||
hasSelectableRows={hasSelectableRows} | ||||||
hasColumnHeaders={hasColumnHeaders} | ||||||
isStriped | ||||||
/> | ||||||
</GridContext.Provider> | ||||||
|
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 |
---|---|---|
|
@@ -295,6 +295,7 @@ function FlowsheetDataGrid(props) { | |
onCellSelect={handleCellSelection} | ||
onClearSelection={handleClearSelectedCells} | ||
onCellRangeSelect={handleCellRangeSelection} | ||
hasColumnHeaders={false} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Flowsheet should have column headers by default. The prop should be able to be set by consumers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I misunderstood the requirements then. I'll change it. |
||
/> | ||
<VisuallyHiddenText aria-live="polite" text={cellSelectionAriaLiveMessage} /> | ||
</div> | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will now go under the Added section. Also, you are allowing the column headers to be hidden. However, it is still possible. Maybe this update was missed based on your other updates in the PR.