Skip to content

Commit

Permalink
chore: Release 2.6.1
Browse files Browse the repository at this point in the history
useBatchedFetch change (Cherry pick not an option due to combination with some devDep changes... my bad)

ERM-2301
  • Loading branch information
EthanFreestone committed Jul 29, 2022
1 parent ccfe8b4 commit 4284935
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change history for stripes-erm-components

## 6.2.1 2022-07-29
* ERM-2300 On loading entitlements for Agreement edit screen incorrect parameters are supplied

## 6.2.0 2022-07-04
* ERM-2225 Amendment/License link status values do not update immediately after Agreement edit
* ERM-2175 Migrate Edit/Create routes to react-query where we have regressions
Expand Down
9 changes: 4 additions & 5 deletions lib/hooks/useBatchedFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@ const DEFAULT_BATCH_LIMIT = 1000;
const useBatchedFetch = ({
batchParams = {},
batchLimit = DEFAULT_BATCH_LIMIT,
batchSize,
batchSize = MAX_BATCH_SIZE,
nsArray, // An array to replace the default namespaceArray defined below
path,
}) => {
const ky = useOkapiKy();
const safeBatchSize = Math.min(batchSize, MAX_BATCH_SIZE);

const paramsArray = useMemo(() => (
generateKiwtQueryParams(
{
...batchParams,
perPage: batchSize
perPage: safeBatchSize
},
{}
)
), [batchParams, batchSize]);

const safeBatchSize = Math.min(batchSize, MAX_BATCH_SIZE);
), [batchParams, safeBatchSize]);

const namespaceArray = nsArray ?? [path, paramsArray, 'stripes-erm-components', 'useBatchedFetch'];

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@folio/stripes-erm-components",
"version": "6.2.0",
"version": "6.2.1",
"description": "Component library for Stripes ERM applications",
"sideEffects": [
"*.css"
Expand Down

0 comments on commit 4284935

Please sign in to comment.