Skip to content

Commit 227efb6

Browse files
Jack-GoldingMonireRasouliEthanFreestone
authored
Release 12.1.3 (#1558)
* ERM-4061, Focus pulled to "Replace agreement' agreement button in Related agreement card (#1545) * Refactored to use the shared TagsFilter component from stripes-erm-cpmponents * revert * ERM-4061, Focus pulled to 'Replace agreement' agreement button in Related agreement card --------- Co-authored-by: EthanFreestone <54310740+EthanFreestone@users.noreply.github.com> * chore: Release 12.1.3 Updated version to 12.1.3 and CHANGELOG.md --------- Co-authored-by: Monireh Rasouli <83644557+MonireRasouli@users.noreply.github.com> Co-authored-by: EthanFreestone <54310740+EthanFreestone@users.noreply.github.com>
2 parents fb044f0 + e13f752 commit 227efb6

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change history for ui-agreements
22

3+
## 12.1.3 2026-06-04
4+
* ERM-4061: Focus pulled to "Replace agreement' agreement button in Related agreement card
5+
36
## 12.1.2 2026-06-04
47
* ERM-4095: Bump erm-stripes-components dep in ui-agreements to ^10.1.1
58
* ERM-4070: Prevent propagation of the edit shortcut "Ctrl-Alt-E", as this results in typing a Euro symbol `` into the focused field when using a German keyboard layout on Windows.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@folio/agreements",
3-
"version": "12.1.2",
3+
"version": "12.1.3",
44
"description": "ERM agreement functionality for Stripes",
55
"main": "src/index.js",
66
"publishConfig": {

src/components/RelatedAgreementsFieldArray/RelatedAgreementField.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,11 @@ const RelatedAgreementField = ({
7070
triggerButton = pluggableRenderProps.buttonRef;
7171

7272
const agreementName = agreement?.name;
73+
const autoFocus = !input?.value?.id;
74+
7375
const buttonProps = {
7476
'aria-haspopup': 'true',
77+
'autoFocus': autoFocus,
7578
'buttonRef': triggerButton,
7679
'buttonStyle': value ? 'default' : 'primary',
7780
'id': `${id}-find-agreement-btn`,
@@ -90,7 +93,6 @@ const RelatedAgreementField = ({
9093
{({ ariaIds }) => (
9194
<Button
9295
aria-labelledby={ariaIds.text}
93-
autoFocus
9496
{...buttonProps}
9597
>
9698
<FormattedMessage id="ui-agreements.relatedAgreements.replaceAgreement" />
@@ -101,7 +103,6 @@ const RelatedAgreementField = ({
101103
}
102104
return (
103105
<Button
104-
autoFocus
105106
{...buttonProps}
106107
>
107108
<FormattedMessage id="ui-agreements.relatedAgreements.linkAgreement" />

0 commit comments

Comments
 (0)