Skip to content

Commit

Permalink
STSMACOM-879 Use this.resources in StripesConnectedSource instead…
Browse files Browse the repository at this point in the history
… of accessing props directly.
  • Loading branch information
BogdanDenis committed Nov 28, 2024
1 parent cc948c9 commit 3bc5b9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Reset `qindex` once the search field is empty. Fixes STSMACOM-872.
* Use `<IfAnyPermission>` and `stripes.hasAnyPerm` to check for Notes assign/unassign perm. Fixes STSMACOM-875.
* Fetch updaters in `<ViewMetaData>` on `props.metadata` changes. Fixes STSMACOM-878.
* Use `this.resources` in `StripesConnectedSource` instead of accessing props directly. Fixes STSMACOM-879.

## [9.2.0](https://github.com/folio-org/stripes-smart-components/tree/v9.2.0) (2024-10-11)
[Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v9.1.3...v9.2.0)
Expand Down
7 changes: 2 additions & 5 deletions lib/SearchAndSort/ConnectedSource/StripesConnectedSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ export default class StripesConnectedSource {
}

failureMessage() {
const {
isRequestUrlExceededLimit,
parentResources,
} = this.props;
const { isRequestUrlExceededLimit } = this.props;

const failed = this.recordsObj.failed;

Expand All @@ -80,7 +77,7 @@ export default class StripesConnectedSource {
// stripes-connect failure object has: dataKey, httpStatus, message, module, resource, throwErrors
const res = `Error ${failed.httpStatus}: ${failed.message.replace(/.*:\s*/, '')}`;
this.logger.log('source', 'failureMessage', res);
return <FormattedMessage id="stripes-smart-components.error.badRequest" values={{ query: parentResources.query.query }} />;
return <FormattedMessage id="stripes-smart-components.error.badRequest" values={{ query: this.resources.query.query }} />;
}

fetchMore(increment) {
Expand Down

0 comments on commit 3bc5b9f

Please sign in to comment.