Share state between nested modal
Hello, is it possible to share state between nested modals, my solution almost works but when i try to re-open child modal I cannot get parent one values to set as default:
Solution:Jump to solution
This should work, in the action modal, use ->form([...])->mountUsing(function (Form $form, Forms\Get $get) { $form->fill([
'color' => $get('heading.color') ?? 'something'
]);
})...
3 Replies
This would be one way of doing it, very hacky:
Anything else?
Solution
This should work, in the action modal, use ->form([...])->mountUsing(function (Form $form, Forms\Get $get) { $form->fill([
'color' => $get('heading.color') ?? 'something'
]);
})
Yes, this works very well! Thanks madam!