Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STSMACOM-789 - Extend NotesAccordion and NotesSmartAccodion components to accept a prop hideNewButton #1414

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Export new `advancedSearchQueryToRows` helper to be used in Inventory app to reduce code duplication. Refs STSMACOM-787.
* Show the username in the "last updated" accordion in the Note editing pane. Fixes STSMACOM-748.
* Added `indexRef` and `inputRef` props to `<SearchAndSort>`. Refs STSMACOM-788.
* Extend NotesAccordion and NotesSmartAccodion components to accept a prop hideNewButton. Refs STSMACOM-789.

## [9.0.0](https://github.com/folio-org/stripes-smart-components/tree/v9.0.0) (2023-10-11)
[Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v8.0.0...v9.0.0)
Expand Down
4 changes: 4 additions & 0 deletions lib/Notes/NotesSmartAccordion/NotesSmartAccordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class NotesSmartAccordion extends Component {
entityType: PropTypes.string.isRequired,
headerProps: PropTypes.object,
hideAssignButton: PropTypes.bool,
hideNewButton: PropTypes.bool,
history: PropTypes.object.isRequired,
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
Expand All @@ -67,6 +68,7 @@ class NotesSmartAccordion extends Component {

static defaultProps = {
hideAssignButton: false,
hideNewButton: false,
label: <FormattedMessage id="stripes-smart-components.notes" />,
referredRecordData: {},
};
Expand Down Expand Up @@ -365,6 +367,7 @@ class NotesSmartAccordion extends Component {
open,
id,
hideAssignButton,
hideNewButton,
label,
headerProps,
} = this.props;
Expand All @@ -391,6 +394,7 @@ class NotesSmartAccordion extends Component {
id={id}
open={open}
hideAssignButton={hideAssignButton}
hideNewButton={hideNewButton}
onToggle={onToggle}
label={label}
onHeaderClick={this.onHeaderClick}
Expand Down
Loading