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

UIREC-428 Fix disable state on Piece form #632

Merged
merged 1 commit into from
Feb 20, 2025
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 @@ -7,6 +7,7 @@
* *Breaking* Update "Send claim" action to use `pieces.send-claims` interface. Refs UIREC-412.
* Add permissions to view claims. Refs UIREC-430.
* Migrate to shared GA workflows. Refs UIREC-431.
* Fix disable state on Piece form. Refs UIREC-428.

## [6.0.6](https://github.com/folio-org/ui-receiving/tree/v6.0.6) (2025-01-06)
[Full Changelog](https://github.com/folio-org/ui-receiving/compare/v6.0.5...v6.0.6)
Expand Down
1 change: 1 addition & 0 deletions src/Piece/PieceForm/PieceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ export default stripesFinalForm({
subscription: {
hasValidationErrors: true,
values: true,
errors: true,
},
mutators: {
setLocationValue: setLocationValueFormMutator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const PieceFormActionButtons = ({
});
const saveButtonLabelId = 'stripes-components.saveAndClose';
const isSaveDisabled = actionsDisabled?.[PIECE_ACTION_NAMES.saveAndClose];
const isActionsMenuDisabled = isSaveDisabled && actionsDisabled?.[PIECE_ACTION_NAMES.delete];
const isActionsMenuDisabled = isSaveDisabled && (actionsDisabled?.[PIECE_ACTION_NAMES.delete] || !isEditMode);

if (actionMenu.length === 0) {
return (
Expand Down