We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.6.11
If src is null/empty/undefined to start, the image does not load when its updated, including when the isLoading state is managed.
There seems to be some handling for "pending":
nextui/packages/hooks/use-image/src/index.ts
Line 118 in eada8cb
No response
The code is roughly:
const App = () => { const [src, setSrc] = useState(null); useEffect(() => { setTimeout(() => { console.log('set src'); setSrc('https://nextui.org/images/fruit-4.jpeg'); }, 5000); }, []); return ( <Image alt="NextUI Image with fallback" height={200} isLoading={!src} src={src} /> {`${src}`} };
The image to load.
macOS
Chrome
The text was updated successfully, but these errors were encountered:
ENG-1845 [BUG] - Changing Image src from null fails to update
Sorry, something went wrong.
+1 I have experienced the same issue.
wingkwong
Successfully merging a pull request may close this issue.
NextUI Version
2.6.11
Describe the bug
If src is null/empty/undefined to start, the image does not load when its updated, including when the isLoading state is managed.
There seems to be some handling for "pending":
nextui/packages/hooks/use-image/src/index.ts
Line 118 in eada8cb
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
The code is roughly:
Expected behavior
The image to load.
Screenshots or Videos
Screen.Recording.2025-01-08.at.8.56.59.AM.mov
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: