rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.7k stars 320 forks source link

[Feature Request] ImageColumn - Conditional Rendering of IMG Tag #1614

Closed lrljoe closed 3 months ago

lrljoe commented 6 months ago
          One suggestion I would make is to somehow support conditional rendering of the `<img>` tag.

This would be useful in cases where, for example, not all products have an image. I'm currently handling this by displaying a placeholder:

->location(fn($row) => $row->default_image ?? Vite::image('placeholders/1x1.png')

However, it could be preferable for some use cases to just not render the <img> tag at all if the location value is empty.

Originally posted by @nathan-io in https://github.com/rappasoft/laravel-livewire-tables/issues/1601#issuecomment-1867999117

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.