Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] 3.x from filamentphp:3.x #8

Merged
merged 19 commits into from
Mar 20, 2025
Merged

[pull] 3.x from filamentphp:3.x #8

merged 19 commits into from
Mar 20, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 20, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

ralphjsmit and others added 19 commits March 18, 2025 16:27
This reverts commit 1aa2ba1.
ImageEntry and ImageColumn documentation states that defaultImageUrl()
is for displaying a placeholder image if one doesn't exist yet.

But If $stateItem is a filled string that points to a location that does
not exist in storage then getImageUrl() will return null due to the file not
existing and by doing so no image is loaded into the browser even though
we set a default placeholder.

So by using the ?? operator in the branch where string is filled we make
sure the browser loads an image whether it's the placeholder or the
storage one.

Sources:
https://filamentphp.com/docs/3.x/tables/columns/image#adding-a-default-image-url
https://filamentphp.com/docs/3.x/infolists/entries/image#adding-a-default-image-url
…com:ralphjsmit/filament into rjs/prevent-catching-db-commit-side-effects
fix: $defaultImageUrl not loading when getImageUrl() is null
…mit-side-effects

Prevent catching side-effects of database transactions being committed
@pull pull bot added the ⤵️ pull label Mar 20, 2025
@pull pull bot merged commit 4fad006 into RanaMoizHaider:3.x Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants