Pass data from parent modal to child
Hello,
I have a usecase where I want to alert user that a specific action will dispatch unreversable data changes, and he needs to confirm it.
For example, a specific department has N services with external role (for example admin on it).
User goes to change the role on a specific service in the department via table action.
When he submits the form, we want to show which users will be affected by this change (tickets will be opened to change the role on the service) and he has to confirm.
To implement this, I need the newly selected role from parent model.
If I inject data argument into action() method, it's always empty.
Code for action:
Solution:Jump to solution
Figured out you can get it from mountedtableactions:
```php
->fillForm(function (Component $livewire) {
dd($livewire->mountedTableActionsData[0]);
// Need parent data here...
1 Reply
Solution
Figured out you can get it from mountedtableactions: