Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Fix save actions when all actions are removed #5672

Merged
merged 3 commits into from
Sep 20, 2024

Conversation

pxpm
Copy link
Contributor

@pxpm pxpm commented Sep 20, 2024

WHY

fixes: Laravel-Backpack/community-forum#134

BEFORE - What was wrong? What was happening before this PR?

When removing all save actions from the form, Backpack would throw an error.

AFTER - What is happening after this PR?

Backpack can handle empty save actions without crashing.

image

HOW

How did you achieve that, in technical terms?

Added a check for the emptiness of save actions, and adjusted the view to display the remaining buttons even if save actions are empty.

Is it a breaking change?

I don't think so, no.

How can we test the before & after?

In a create/update operation, do CRUD::removeAllSaveActions()

@pxpm pxpm merged commit 2507ba6 into main Sep 20, 2024
9 checks passed
@pxpm pxpm deleted the fix-save-actions-when-all-actions-are-removed branch September 20, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Save actions on edit operation
2 participants