Power-Components / livewire-powergrid

⚡ PowerGrid generates modern, powerful and easy-to-customize data tables using Laravel Livewire.
https://livewire-powergrid.com
MIT License
1.46k stars 215 forks source link

OpenModal with PowerGrid in Tailwind & Alpine #132

Closed abbasmashaddy72 closed 2 years ago

abbasmashaddy72 commented 2 years ago

Describe the bug

[App\Http\Livewire\DeleteModal] does not implement [LivewireUI\Modal\Contracts\ModalComponent] interface.

To Reproduce Used you Demo project to implement it in my project but something got missing & also followed the Open Model Docs

Laravel version (exactly):

Alpine version:

Theme:

Screenshots (This helps to understand better) Unfortunately, I reverted it back as I was not able to fix it

Do you have any idea how we can fix it? No

abbasmashaddy72 commented 2 years ago

I got it fixed by implementing the ModalComponent in DeleteModal livewire controller, but unfortunately I am getting this error now

Method App\Http\Livewire\DeleteModal::closeModalOnClickAway does not exist.

Screenshot from 2021-11-16 09-49-48

@emtudo @luanfreitasdev

luanfreitasdev commented 2 years ago

Hi, I won't be able to tell you because it seems that the problem is in the modal component.

Please have a look at this: closeModalOnClickAway at https://github.com/wire-elements/modal

abbasmashaddy72 commented 2 years ago

Thanks

luanfreitasdev commented 2 years ago

If you can give feedback on the solution.

abbasmashaddy72 commented 2 years ago

I was implementing the model component wrongly in livewire controller, I should have to extend it not implement it.

So, was able to fix it.

The Answer was from wire-elements/modal ##community

you can reffer the Issue on there repo

muhammedshiffin commented 2 years ago

for some reason, I cannot close the modal once it is open. Anything I am missing? am using the modal in a TALL Stack application.

muhammedshiffin commented 2 years ago

for some reason, I cannot close the modal once it is open. Anything I am missing? am using the modal in a TALL Stack application.

Resolved, It was just the alpine js version I had, upgraded and everything works like a charm.