Success Notification for CreateOptionAction with injected created Record
Hi!
I have a Select with a CreateOption Action. I would like to show a Success Notification after Record Creation, but I have more elaborate Notifications throughout my App, that require me to either inject the created Record instance into the after() method of the action or some way to get the $createdOptionKey that is accessable in the default action.
I don't want to overwrite the whole default action just for the benefit of getting a "better" notification - is there a way to get the model instance or key of the created record in the after() callback?
Thank you!
1 Reply
It's not the most satisfactory answer... In fact, I don't really like it at all, but what I've seen work so far is to use the $data prop on the after function to search for the record with the exact values you just created.