Add a Create and edit button
In a RelationManager:
How can I use custom or CreateAction to Create the record and keep editing and not Close the modal
6 Replies
Not sure what you mean....what is the use case for this ?
In the a RelationManager List I have a CreateAction::make()
Which opens a modal that has a create button. When tht button is used the record is created and the modal is closed
I would like to keep the modal open refreshed with any data from the
->mutateFormDataUsing
of the CreateAction
And make a Save Button that saves progress without closing modal.Add a custom action? which saves the state and then re-populates the form with the saved model.
Exactly for the Save Action
but for the CreateAction it would be best if I could use built-in to make sure I get all the nessasary parts
for example my custom create Action saves a record but the $context did not change so the create button remains visible with
->visible(fn (string $context): bool => $context === 'create')
on the Action.Solution
Turns out it is easy once I know to add this to my CreateAction