Open aliaswpeu opened 8 months ago
Please, provide full code example
i have same issue,
i try to show example : LightboxImageEntry::make('foo') ->image('https://biati-digital.github.io/glightbox/demo/img/small/gm2.jpg') ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm2.jpg');
just show like this
LightboxImageEntry::make('foo')
@tenroaji are you sure that you have the foo
field in your model? You must use this entry on existing field, for example, try id
I am experiencing the exact same issue. Created a modal action, which load a custom view. The view contains a livewire component. The image displays in the modal, but as soon as I click on it, the image open browser tab and not with lightbox.
It is like lightbox is not initializing on a modal.
I found a solution, not sure its an ideal solution but it works.
Seems like the newly added items to the DOM is not seen by the JS. So I have added this to my blade and it works.
@script
<script type="module">
Livewire.hook('morph.added', (element) => {
const lightbox = GLightbox(@json(config('filament-lightbox')));
});
</script>
@endscript
LightboxImageEntry::make('foo')
@tenroaji are you sure that you have the
foo
field in your model? You must use this entry on existing field, for example, tryid
sorry, this is my mistake, after I tried with the existing field it was already working, thank you
What happened?
When i have a table action with infolist as modal action, the ligtbox is not opening, when i click image it shows image without lightbox. `->actions([ \Filament\Tables\Actions\Action::make('View Information')
`
How to reproduce the bug
Click on image
Package Version
latest
PHP Version
8.2
Laravel Version
latest
Filament Version
latest
Notes
No response