Skip to content

Commit

Permalink
UIMARCAUTH-415: Pass the record search error to the SearchResultsList…
Browse files Browse the repository at this point in the history
… component. (#399)
  • Loading branch information
Dmytro-Melnyshyn authored Jun 18, 2024
1 parent a3f31c0 commit 9c0bee5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [UIMARCAUTH-396](https://issues.folio.org/browse/UIMARCAUTH-396) Add quickMARC shortcuts to modal.
- [UIMARCAUTH-375](https://issues.folio.org/browse/UIMARCAUTH-375) Quick export from authority detail view.
- [UIMARCAUTH-410](https://issues.folio.org/browse/UIMARCAUTH-410) Open manage authority file settings in full screen view.
- [UIMARCAUTH-410](https://issues.folio.org/browse/UIMARCAUTH-415) Pass the record search error to the `SearchResultsList` component.

## [5.0.1](https://github.com/folio-org/ui-marc-authorities/tree/v5.0.1) (2024-04-02)

Expand Down
2 changes: 2 additions & 0 deletions src/routes/BrowseRoute/BrowseRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const BrowseRoute = ({ children }) => {
query,
firstPageQuery,
totalRecords,
error,
} = useAuthoritiesBrowse({
filters,
searchQuery,
Expand Down Expand Up @@ -92,6 +93,7 @@ const BrowseRoute = ({ children }) => {
return (
<AuthoritiesSearch
authorities={formattedAuthoritiesForView}
error={error}
hasNextPage={hasNextPage}
hasPrevPage={hasPrevPage}
totalRecords={totalRecords}
Expand Down
2 changes: 2 additions & 0 deletions src/routes/SearchRoute/SearchRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const SearchRoute = ({ children }) => {
isLoaded,
totalRecords,
query,
error,
} = useAuthorities({
searchQuery,
searchIndex,
Expand Down Expand Up @@ -100,6 +101,7 @@ const SearchRoute = ({ children }) => {
return (
<AuthoritiesSearch
authorities={authorities}
error={error}
isLoading={isLoading}
isLoaded={isLoaded}
totalRecords={totalRecords}
Expand Down
4 changes: 4 additions & 0 deletions src/views/AuthoritiesSearch/AuthoritiesSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const propTypes = {
PropTypes.node,
PropTypes.arrayOf(PropTypes.node),
]).isRequired,
error: PropTypes.object,
firstPageQuery: PropTypes.string.isRequired,
handleLoadMore: PropTypes.func.isRequired,
hasNextPage: PropTypes.bool,
Expand All @@ -103,6 +104,7 @@ const propTypes = {

const AuthoritiesSearch = ({
children,
error,
onHeaderClick,
handleLoadMore,
authorities,
Expand Down Expand Up @@ -628,6 +630,7 @@ const AuthoritiesSearch = ({
[searchResultListColumns.HEADING_TYPE]: '170px',
[searchResultListColumns.AUTHORITY_SOURCE]: '250px',
}}
error={error}
formatter={formatter}
hasNextPage={hasNextPage}
hasPrevPage={hasPrevPage}
Expand Down Expand Up @@ -663,6 +666,7 @@ const AuthoritiesSearch = ({

AuthoritiesSearch.propTypes = propTypes;
AuthoritiesSearch.defaultProps = {
error: null,
hidePageIndices: false,
query: '',
hasNextPage: null,
Expand Down

0 comments on commit 9c0bee5

Please sign in to comment.