Modal isn't receiving the arguments passed. #503
Closed
kwadejeffrey
started this conversation in
General
Replies: 1 comment
-
|
Solved!!! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I pass data when I dispatch openModal event but the receiving modal doesn't seem to receive it.
<button wire:click="$dispatch('openModal', { component: 'utilities.modal.online-order.menu-item-modal', arguments: { item: {{ $item->id }} }})" class="w-full mt-4 px-4 py-2 text-white bg-green-500 rounded-lg hover:bg-green-600 transition-all"> Add to Cart </button>.But I can see the argument from the network tab
`
This is my Modal
`use App\Models\RestaurantMenuItem;
use Livewire\Component;
use Illuminate\Http\Request;
use LivewireUI\Modal\ModalComponent;
class MenuItemModal extends ModalComponent
{
public RestaurantMenuItem $item;
Beta Was this translation helpful? Give feedback.
All reactions