laravel-livewire-tables
laravel-livewire-tables copied to clipboard
[Feature Request] ImageColumn - Conditional Rendering of IMG Tag
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
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.
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.